@@ -17,13 +17,13 @@ inputs:
1717 description : Report level for reviewdog [info,warning,error].
1818 default : error
1919 reporter :
20- description : Reporter of reviewdog command [github-check,github-pr-review,github-pr-check].
20+ description : Reporter of reviewdog command [github-check,github-pr-review,github-pr-check,sarif ].
2121 default : github-check
2222 filter_mode :
2323 description : |
2424 Filtering mode for the reviewdog command [added,diff_context,file,nofilter].
25- Default is added.
26- default : added
25+ Default is ` added` except that sarif reporter uses `nofilter` .
26+ default : ' '
2727 fail_on_error :
2828 description : |
2929 Exit code for reviewdog when errors are found [true,false].
@@ -32,6 +32,9 @@ inputs:
3232 reviewdog_flags :
3333 description : Additional reviewdog flags.
3434 default : ' '
35+ output_dir :
36+ description : Output directory of reviewdog result. Useful for -reporter=sarif
37+ default : ../reviewdog-results
3538 # ## Flags for rails_best_practices ###
3639 rails_best_practices_version :
3740 description : rails_best_practices version
5861 INPUT_FILTER_MODE : ${{ inputs.filter_mode }}
5962 INPUT_FAIL_ON_ERROR : ${{ inputs.fail_on_error }}
6063 INPUT_REVIEWDOG_FLAGS : ${{ inputs.reviewdog_flags }}
64+ INPUT_OUTPUT_DIR : ${{ inputs.output_dir }}
6165 INPUT_RAILS_BEST_PRACTICES_VERSION : ${{ inputs.rails_best_practices_version }}
6266 INPUT_RAILS_BEST_PRACTICES_FLAGS : ${{ inputs.rails_best_practices_flags }}
67+ - if : inputs.reporter == 'sarif'
68+ uses : github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
69+ with :
70+ sarif_file : ${{ inputs.output_dir }}
6371
6472# Ref: https://haya14busa.github.io/github-action-brandings/
6573branding :
0 commit comments