chore(deps): update all non-major docker images (#377) #312
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: "Terraform" | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AWS_REGION: ca-central-1 | |
TERRAFORM_VERSION: 1.6.1 | |
TERRAGRUNT_VERSION: 0.52.1 | |
TF_VAR_api_auth_token: ${{ secrets.TF_VARS_API_AUTH_TOKEN }} | |
TF_VAR_notify_key: ${{ secrets.TF_VARS_NOTIFY_KEY }} | |
TF_VAR_rds_password: ${{ secrets.TF_VARS_RDS_PASSWORD }} | |
TF_VAR_slack_webhook_url: ${{ secrets.TF_VARS_SLACK_WEBHOOK_URL }} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
terragrunt-apply: | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Configure AWS credentials using OIDC | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT }}:role/list-manager-apply | |
role-session-name: TPApply | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Setup terraform tools | |
uses: cds-snc/terraform-tools-setup@v1 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: filter | |
with: | |
filters: | | |
api: | |
- 'terragrunt/aws/api/**' | |
- 'terragrunt/env/api/**' | |
hosted_zone: | |
- 'terragrunt/aws/hosted_zone/**' | |
- 'terragrunt/env/hosted_zone/**' | |
- name: Apply hosted_zone | |
if: ${{ steps.filter.outputs.hosted_zone == 'true' }} | |
working-directory: terragrunt/env/hosted_zone | |
run: | | |
terragrunt apply --terragrunt-non-interactive -auto-approve | |
- name: Apply api | |
if: ${{ steps.filter.outputs.api == 'true' }} | |
working-directory: terragrunt/env/api | |
run: | | |
terragrunt apply --terragrunt-non-interactive -auto-approve | |
- name: Run WAF smoketests | |
if: ${{ steps.filter.outputs.api == 'true' }} | |
run: | | |
.github/workflows/scripts/run_waf_smoke_tests.sh |