File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,16 @@ jobs:
13
13
- uses : actions/checkout@v3
14
14
- uses : cpp-linter/cpp-linter-action@composite-action
15
15
id : linter
16
+ continue-on-error : true
16
17
env :
17
18
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
19
with :
19
20
style : file
20
21
files-changed-only : false
22
+ quiet-fail : false
21
23
22
24
- name : Fail fast?!
23
- if : steps.linter.outputs.checks-failed > 0
25
+ if : steps.linter.outcome == 'failure'
24
26
run : |
25
27
echo "Some files failed the linting checks!"
26
28
# for actual deployment
Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ inputs:
74
74
description : The directory containing compile_commands.json file.
75
75
required : false
76
76
default : " "
77
- outputs :
78
- checks- failed:
79
- description : An integer that can be used as a boolean value to indicate if all checks failed.
80
- value : ${{ steps.set-checks-failed.outputs.checks-failed }}
77
+ quiet-fail :
78
+ description : A flag that can be used to exit with a non-successfull error code (not '0') if any checks failed.
79
+ required : false
80
+ default : true
81
81
runs :
82
82
using : " composite"
83
83
steps :
@@ -105,3 +105,7 @@ runs:
105
105
--ignore="${{ inputs.ignore }}" \
106
106
--database=${{ inputs.database }} \
107
107
--file-annotations=${{ inputs.file-annotations }}
108
+ - name : set output variable
109
+ if : steps.cpp-linter.outputs.checks-failed != 0 && inputs.quiet-fail != 'true'
110
+ shell : bash
111
+ run : exit 1
You can’t perform that action at this time.
0 commit comments