Skip to content

Commit 73d43ab

Browse files
committed
ci: Update TFLint action version.
1 parent f5dc98c commit 73d43ab

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/tflint.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,34 @@ 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
3644
if: always()
37-
uses: Miragon/sarif-report-parse@v1.0.4
45+
uses: jontyms/sarif-annotations@v0.0.3
3846
with:
39-
severity-level: low
4047
sarif-file: tflint-results.sarif
48+
annotation-level: notice
49+
# - name: Parse SARIF file for annotations
50+
# if: always()
51+
# uses: Miragon/[email protected]
52+
# with:
53+
# severity-level: notice
54+
# sarif-file: tflint-results.sarif
4155
# When run on main, if SARIF uploads are available, we want to upload the
4256
# SARIF file to GitHub.
4357
- name: Upload SARIF result

0 commit comments

Comments
 (0)