fix: correct Liquibase checksums for MySQL after adding <removeChange… #16
This file contains hidden or 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: Deploy | |
| on: | |
| push: | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore | |
| branches: | |
| - prod | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
| permissions: | |
| contents: read # for "git clone" | |
| defaults: | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun | |
| run: | |
| # Enable fail-fast behavior using set -eo pipefail | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference | |
| shell: bash | |
| # @todo #1154 Deploy should depend on successful execution of the other pipelines | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Clone source code | |
| uses: actions/checkout@v4.2.2 # https://github.com/actions/checkout | |
| with: | |
| # Whether to configure the token or SSH key with the local git config. Default: true | |
| persist-credentials: false | |
| - name: Install JDK | |
| uses: actions/setup-java@v4.7.0 # https://github.com/actions/setup-java | |
| with: | |
| distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | |
| java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | |
| - name: Restore existing cache | |
| uses: actions/cache@v4.2.0 # https://github.com/actions/cache | |
| with: | |
| # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | |
| key: maven-repository-${{ hashFiles('pom.xml') }} | |
| path: ~/.m2/repository | |
| restore-keys: maven-repository- | |
| - name: Build WAR file | |
| # NOTE: we use -Dmaven.test.skip=true instead of -DskipUnitTests=true | |
| # in order to skip both compilation and execution of the tests | |
| run: >- | |
| mvn \ | |
| --batch-mode \ | |
| -Denforcer.skip=true \ | |
| -Dmaven.test.skip=true \ | |
| package | |
| - name: Install ansible | |
| # NOTE: during version bump don't forget to update in other places: provisioning-by-ansible.yml and provisioning-by-terraform.yml | |
| run: pip3 install ansible==3.4.0 | |
| # https://docs.ansible.com/ansible/3/collections/community/general/uptimerobot_module.html | |
| # https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html#installing-an-older-version-of-a-collection | |
| - name: Install community.general collection for UptimeRobot | |
| run: ansible-galaxy collection install community.general:==2.5.2 | |
| # https://docs.ansible.com/ansible/3/collections/ansible/posix/debug_callback.html | |
| - name: Install ansible.posix.debug for debug callback | |
| run: ansible-galaxy collection install ansible.posix:==1.2.0 | |
| - name: Run deploy.sh | |
| env: | |
| # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow | |
| VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }} | |
| run: ./src/main/scripts/ci/deploy.sh |