-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure tflint & tf format pipelines along with fixing any issues
- Loading branch information
1 parent
2fb76be
commit c676bc6
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
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
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 |