Internal - AWS - Save Aurora PostgreSQL Versions as an artifact #173
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
| --- | |
| # This workflow updates an artifact containing the Aurora PostgreSQL versions, | |
| # it's used by renovate and published at https://camunda.github.io/camunda-deployment-references/aurora_postgres_versions.txt | |
| name: Internal - AWS - Save Aurora PostgreSQL Versions as an artifact | |
| on: | |
| schedule: | |
| - cron: 0 1 * * * | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - .github/workflows/internal_aws_artifact_aurora_versions.yml | |
| env: | |
| AWS_REGION: eu-west-2 | |
| AWS_PROFILE: infraex | |
| jobs: | |
| save-aurora-versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: gh-pages | |
| - name: Install asdf tools with cache | |
| uses: camunda/infraex-common-config/./.github/actions/asdf-install-tooling@193a21e1e56c9a65517a822224ac3b4ffa4d6ae4 # 1.5.9 | |
| - uses: camunda/camunda-deployment-references/.github/actions/aws-configure-cli@main | |
| with: | |
| vault-addr: ${{ secrets.VAULT_ADDR }} | |
| vault-role-id: ${{ secrets.VAULT_ROLE_ID }} | |
| vault-secret-id: ${{ secrets.VAULT_SECRET_ID }} | |
| aws-profile: ${{ env.AWS_PROFILE }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Output Aurora PostgreSQL versions to file | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p docs | |
| aws rds describe-db-engine-versions \ | |
| --engine aurora-postgresql \ | |
| --no-cli-pager \ | |
| | jq -r '.DBEngineVersions[].EngineVersion' \ | |
| | sort -V \ | |
| > docs/aurora_postgres_versions.txt | |
| cat docs/aurora_postgres_versions.txt | |
| - name: Commit and push Aurora PostgreSQL versions file to gh-pages | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git diff --exit-code docs/aurora_postgres_versions.txt || { | |
| echo "Changes detected, committing and pushing to gh-pages" | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/aurora_postgres_versions.txt | |
| git commit -m "Update Aurora PostgreSQL versions" | |
| git push origin gh-pages | |
| } | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Notify in Slack in case of failure | |
| id: slack-notification | |
| if: failure() && github.event_name == 'schedule' | |
| uses: camunda/infraex-common-config/.github/actions/report-failure-on-slack@193a21e1e56c9a65517a822224ac3b4ffa4d6ae4 # 1.5.9 | |
| with: | |
| vault_addr: ${{ secrets.VAULT_ADDR }} | |
| vault_role_id: ${{ secrets.VAULT_ROLE_ID }} | |
| vault_secret_id: ${{ secrets.VAULT_SECRET_ID }} |