Skip to content

manual-SNAPSHOT

manual-SNAPSHOT #15

name: manual-SNAPSHOT
env:
GPG_KEY_ID_GITHUB_TECHUSER: '${{ secrets.GPG_KEY_ID_GITHUB_TECHUSER }}'
TECH_USER_USERNAME: ${{ vars.TECH_USER_USERNAME }}
TECH_USER_EMAIL: ${{ vars.TECH_USER_EMAIL }}
PROJECT_NAME: ${GITHUB_REPOSITORY#*/}
DOCKER_BAKE_PLATFORM: ${{ vars.BAKE_PLATFORMS }}
on:
workflow_dispatch:
inputs:
comment:
# Friendly description to be shown in the UI instead of 'name'
description: 'Comment for snapshot'
# Default value if no value is explicitly provided
default: 'Start SNAPSHOT from WEB UI'
# Input has to be provided for the workflow to run
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
manual-SNAPSHOT:
name: Manual snapshot release
runs-on: ubuntu-latest
steps:
###############
# pre release
###############
- name: Import GPG key
# GPG private key exported by armor (begins with: '-----BEGIN PGP PRIVATE KEY BLOCK-----') the whole content encoded with base64, and loaded in the content of the secret
# Decode and load the base64 encoded private key
run: |
mkdir -p ~/.gnupg/
echo "${{ secrets.GPG_SIGNING_KEY_GITHUB_TECHUSER }}" | base64 --decode > ~/.gnupg/private.key
gpg --import ~/.gnupg/private.key
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
# The content is in PEM format (begins with: '-----BEGIN RSA PRIVATE KEY-----') SSH key
key: ${{ secrets.SSH_PRIVATE_KEY_GITHUB_TECHUSER }}
name: id_rsa # optional
known_hosts: ${{ secrets.KNOWN_HOSTS }} # jelenleg ures a tartalma
# config: ${{ secrets.CONFIG }} # ssh_config; optional
- name: Configure GIT for signed commit
run: |
git config --global user.name "${{ env.TECH_USER_USERNAME }}"
git config --global user.email "${{ env.TECH_USER_EMAIL }}"
git config --global user.signingkey "${{ secrets.GPG_KEY_ID_GITHUB_TECHUSER }}"
git config --global commit.gpgsign true
git config --global tag.gpgSign true
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Checkout main
uses: actions/checkout@v4
###############
## release
###############
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: docker buildx bake "#1"
uses: docker/bake-action@v4
with:
set: |
*.platform=${{ env.DOCKER_BAKE_PLATFORM }}
push: true
files: |
docker-compose-1.yml
targets: wildfly-ms-release,wildfly-jpa-release,wildfly-full-release
- name: docker buildx bake "#2"
uses: docker/bake-action@v4
with:
set: |
*.platform=${{ env.DOCKER_BAKE_PLATFORM }}
push: true
files: |
docker-compose-2.yml
targets: wildfly-ms-microprofile-release,wildfly-ms-jpa-microprofile-release,wildfly-full-microprofile-release
- name: docker buildx bake "#3"
uses: docker/bake-action@v4
with:
set: |
*.platform=${{ env.DOCKER_BAKE_PLATFORM }}
push: true
files: |
docker-compose-3.yml
targets: wildfly-mp-jpa-oracle-jdbc-release,wildfly-mp-full-oracle-jdbc-release,wildfly-mp-jpa-postgresql-jdbc-release,wildfly-mp-full-postgresql-jdbc-release,wildfly-mp-jpa-mariadb-jdbc-release,wildfly-mp-full-mariadb-jdbc-release
- name: docker buildx bake "#4"
uses: docker/bake-action@v4
with:
set: |
*.platform=${{ env.DOCKER_BAKE_PLATFORM }}
push: true
files: |
docker-compose-3.yml
targets: wildfly-mp-full-oracle-jdbc-ibm-mq-release