ci: bump actions/setup-java from 4.5.0 to 4.6.0 #14
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: 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.6.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 | |
# The command pip3 install --user ansible==2.10.17 doesn't work as we have an old version | |
# See https://docs.ansible.com/ansible/2.10/installation_guide/intro_installation.html#installing-devel-from-github-with-pip | |
# NOTE: during version bump don't forget to update in other places: provisioning-by-ansible.yml and provisioning-by-terraform.yml | |
run: python3 -m pip install --user https://github.com/ansible/ansible/archive/refs/tags/v2.10.17.tar.gz | |
# https://docs.ansible.com/ansible/2.10/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:==1.3.6 | |
# https://docs.ansible.com/ansible/2.10/collections/ansible/posix/debug_callback.html | |
- name: Install ansible.posix.debug for debug callback | |
run: ansible-galaxy collection install ansible.posix:==1.1.1 | |
- 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 |