Skip to content

Commit

Permalink
Configure tflint & tf format pipelines along with fixing any issues
Browse files Browse the repository at this point in the history
  • Loading branch information
velotioaastha committed Aug 6, 2024
1 parent 2fb76be commit c676bc6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pr-tflint-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tflint Checks on Terraform Code
on:
pull_request:
jobs:
tflint-checks:
runs-on: ubuntu-latest
steps:
- name : Clone repo
uses: actions/checkout@master
- uses: actions/cache@v2
name: Cache plugin dir
with:
path: ~/.tflint.d/plugins
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- uses: terraform-linters/setup-tflint@v2
name: Setup TFLint
with:
github_token: ${{ github.token }}
- name: Show version
run: tflint --version
- name: Init TFLint
run: tflint --init
# Run tflint command in each directory recursively # use --force if you want to continue with workflow although errors are there
- name: Run TFLint
run: tflint -f compact --recursive

0 comments on commit c676bc6

Please sign in to comment.