Release new version #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Release new version' | |
on: workflow_dispatch | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'dockerfile-image-update-') == false | |
steps: | |
- name: checkout | |
uses: actions/checkout@main | |
with: | |
ref: ${{ github.ref }} | |
- name: docker build | |
run: make mvn-docker-build get-main-project-dirs | |
- name: Upload main module | |
uses: actions/upload-artifact@v1 | |
with: | |
name: dockerfile-image-update | |
path: dockerfile-image-update | |
- name: Upload itest module | |
uses: actions/upload-artifact@v1 | |
with: | |
name: dockerfile-image-update-itest | |
path: dockerfile-image-update-itest | |
get-next-version: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'dockerfile-image-update-') == false | |
outputs: | |
version: ${{ steps.version_tag.outputs.new_version }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: get version | |
id: version_tag | |
run: | | |
make get-new-version-from-tag | |
echo "new_version=$(cat new_patch_version.txt)" >> $GITHUB_OUTPUT | |
integration-test: | |
runs-on: ubuntu-latest | |
needs: [build-test, get-next-version] | |
steps: | |
- name: checkout | |
uses: actions/checkout@main | |
with: | |
ref: ${{ github.ref }} | |
- name: Download itest dir | |
uses: actions/download-artifact@v1 | |
with: | |
name: dockerfile-image-update-itest | |
- name: integration test | |
env: | |
ITEST_GH_TOKEN: ${{ secrets.ITEST_GH_TOKEN }} | |
run: echo "Testing new version ${{ needs.get-next-version.outputs.version }}" && make integration-test | |
deploy: | |
needs: [ integration-test, get-next-version ] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: checkout | |
uses: actions/checkout@main | |
with: | |
ref: ${{ github.ref }} | |
- name: Download main project dir | |
uses: actions/download-artifact@v1 | |
with: | |
name: dockerfile-image-update | |
- name: deploy | |
env: | |
encrypted_00fae8efff8c_iv: ${{ secrets.encrypted_00fae8efff8c_iv }} | |
encrypted_00fae8efff8c_key: ${{ secrets.encrypted_00fae8efff8c_key }} | |
encrypted_96e73e3cb232_iv: ${{ secrets.encrypted_96e73e3cb232_iv }} | |
encrypted_96e73e3cb232_key: ${{ secrets.encrypted_96e73e3cb232_key }} | |
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
CI_DEPLOY_USER: ${{ secrets.CI_DEPLOY_USER }} | |
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | |
NEW_PATCH_VERSION: ${{ needs.get-next-version.outputs.version }} | |
run: make deploy |