Lint #2
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: Lint | |
on: [push] | |
jobs: | |
fmt: | |
name: fmt check | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
# renovate: datasource=github-releases depName=hashicorp/terraform | |
terraform_version: "1.8.2" | |
- name: terraform fmt check | |
run: terraform fmt -check -diff | |
validate: | |
name: validate | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
# renovate: datasource=github-releases depName=hashicorp/terraform | |
terraform_version: "1.8.2" | |
- name: Init | |
run: terraform init -lockfile=readonly | |
- name: Validate | |
run: terraform validate | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
# renovate: datasource=github-releases depName=hashicorp/terraform | |
terraform_version: "1.8.2" | |
- uses: terraform-linters/setup-tflint@v4 | |
name: Setup | |
with: | |
# renovate: datasource=github-releases depName=terraform-linters/tflint | |
tflint_version: v0.50.3 | |
- name: Init | |
run: tflint --init | |
env: | |
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Lint | |
run: tflint --format compact |