tflint #1086
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: tflint | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
tflint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Generate Token | |
id: generate-token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
with: | |
app_id: "${{ secrets.BOT_APP_ID }}" | |
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" | |
- uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4 | |
name: Setup TFLint | |
with: | |
github_token: "${{ steps.generate-token.outputs.token }}" | |
- name: Show version | |
run: tflint --version | |
- name: Init TFLint | |
run: tflint --init | |
# --force continue with workflow when an error raises | |
- name: Run TFLint | |
run: tflint -f compact --recursive |