chore: improve o11y #66
Workflow file for this run
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: "CI for PR (Terraform/Blue)" | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'deployment/terraform/**' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
id-token: write | |
issues: write | |
pull-requests: write | |
jobs: | |
ci: | |
name: "CI" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
directory: | |
- deployment/terraform/blue | |
- deployment/terraform/modules/iam | |
- deployment/terraform/modules/artifact_registry | |
- deployment/terraform/modules/cloud_run | |
- deployment/terraform/modules/cloud_scheduler_job | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup Terraform" | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.8.2 | |
terraform_wrapper: false | |
cli_config_credentials_token: "${{ secrets.TF_CLOUD_CREDENTIALS_TOKEN }}" | |
- name: "Terraform Init" | |
id: init | |
working-directory: ${{ matrix.directory }} | |
run: terraform init | |
- name: "Run fmt" | |
id: fmt | |
working-directory: ${{ matrix.directory }} | |
run: terraform fmt -check -recursive | |
- name: "Run Validate" | |
id: validate | |
working-directory: ${{ matrix.directory }} | |
run: terraform validate -no-color | |
- name: "Setup TFLint" | |
uses: terraform-linters/setup-tflint@v4 | |
with: | |
tflint_version: v0.50.3 | |
if: ${{ matrix.directory == 'deployment/terraform/blue' }} | |
- name: "Run TFLint" | |
id: tflint | |
working-directory: ${{ matrix.directory }} | |
run: tflint -f compact | |
if: ${{ matrix.directory == 'deployment/terraform/blue' }} | |
- name: "Terraform Plan" | |
id: plan | |
working-directory: deployment/terraform/blue | |
run: terraform plan | |
continue-on-error: true | |
if: ${{ matrix.directory == 'deployment/terraform/blue' }} |