linting #41
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: "Code Quality: Terraform" | |
on: | |
push: | |
jobs: | |
terraform: | |
name: Terraform | |
runs-on: ubuntu-latest | |
strategy: | |
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast | |
fail-fast: false | |
matrix: | |
examples: | |
- "./examples/basic" | |
- "./examples/branch_protection" | |
- "./examples/complex" | |
- "./examples/deploy_keys" | |
- "./examples/files" | |
- "./examples/issue_labels" | |
- "./examples/pages" | |
- "./examples/project" | |
- "./examples/project_columns" | |
- "./examples/template" | |
- "./examples/webhook" | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v1 | |
with: | |
terraform_wrapper: false | |
terraform_version: ${{ secrets.TERRAFORM_VERSION }} | |
- name: Format Terraform code for Module | |
run: terraform fmt -check -recursive | |
env: | |
working-dir: "./" | |
- name: Initialize Terraform for Examples | |
run: terraform init | |
env: | |
working-dir: "${{ matrix.examples }}" | |
- name: Format Terraform code for Examples | |
run: terraform fmt -check -recursive | |
env: | |
working-dir: "${{ matrix.examples }}" | |
- name: Validate Terraform code for Examples | |
run: terraform validate | |
env: | |
working-dir: "${{ matrix.examples }}" |