@@ -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]}" 
3543name : 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+ 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