Skip to content

Commit 7e65334

Browse files
committed
ci: Update TFLint action version.
1 parent f5dc98c commit 7e65334

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/tflint.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,33 @@ jobs:
2424
with:
2525
path: ~/.tflint.d/plugins
2626
key: tflint-${{ hashFiles('.tflint.hcl') }}
27-
- uses: terraform-linters/setup-tflint@v5
27+
- uses: terraform-linters/setup-tflint@v6
2828
name: Setup TFLint
2929
- name: Show version
3030
run: tflint --version
3131
- name: Init TFLint
3232
run: tflint --init
3333
- name: Run TFLint
34-
run: tflint --format sarif --recursive --config "$GITHUB_WORKSPACE/.tflint.hcl" > tflint-results.sarif
34+
# Run TFLint, outputting the results to a SARIF file. We use `tee` so
35+
# that we can still see the output in the logs, and capture the exit
36+
# code properly with `pipefail`.
37+
run: |
38+
set -o pipefail
39+
tflint --format sarif --recursive \
40+
--config "$GITHUB_WORKSPACE/.tflint.hcl" \
41+
| tee tflint-results.sarif
42+
exit "${PIPESTATUS[0]}"
3543
- name: Parse SARIF file for annotations
36-
if: always()
37-
uses: Miragon/[email protected]
44+
uses: jontyms/[email protected]
3845
with:
39-
severity-level: low
4046
sarif-file: tflint-results.sarif
47+
annotation-level: notice
48+
# - name: Parse SARIF file for annotations
49+
# if: always()
50+
# uses: Miragon/[email protected]
51+
# with:
52+
# severity-level: notice
53+
# sarif-file: tflint-results.sarif
4154
# When run on main, if SARIF uploads are available, we want to upload the
4255
# SARIF file to GitHub.
4356
- name: Upload SARIF result

0 commit comments

Comments
 (0)