77 required : true
88 type : string
99 outputs :
10+ fatal :
11+ value : ${{ jobs.checks.outputs.fatal}}
1012 fail :
1113 value : ${{ jobs.checks.outputs.fail }}
1214 warn :
1921 continue-on-error : true
2022
2123 outputs :
24+ fatal : ${{ steps.assert.outputs.fatal }}
2225 fail : ${{ steps.assert.outputs.fail }}
2326 warn : ${{ steps.assert.outputs.warn }}
2427
@@ -30,20 +33,21 @@ jobs:
3033 source ci/build.sh
3134 apply_prerun
3235
33- - name : Cancel steps
36+ - name : Assert state
3437 if : ${{ failure() }}
35- run : >
36- echo "::error ::ci: Cannot proceed at this condition, the workflow will be cancelled."
37- "FATAL=true" >> "$GITHUB_ENV"
38+ run : |
39+ source ci/build.sh
40+ set_step_fail "assert_state"
41+ "fatal=true" >> "$GITHUB_ENV"
3842
3943 - name : License
40- if : ${{ !cancelled() && env.FATAL != 'true' }}
44+ if : ${{ !cancelled() && env.fatal != 'true' }}
4145 run : |
4246 source ci/build.sh
4347 check_license
4448
4549 - name : Check patch
46- if : ${{ !cancelled() && env.FATAL != 'true' }}
50+ if : ${{ !cancelled() && env.fatal != 'true' }}
4751 run : |
4852 source ci/build.sh
4953 export -f check_checkpatch set_step_fail set_step_warn
5256 exit $status
5357
5458 - name : Coccicheck
55- if : ${{ !cancelled() && env.FATAL != 'true' }}
59+ if : ${{ !cancelled() && env.fatal != 'true' }}
5660 run : |
5761 source ci/build.sh
5862 export -f check_coccicheck set_step_fail set_step_warn
@@ -61,13 +65,13 @@ jobs:
6165 exit $status
6266
6367 - name : CPP Check
64- if : ${{ !cancelled() && env.FATAL != 'true' }}
68+ if : ${{ !cancelled() && env.fatal != 'true' }}
6569 run : |
6670 source ci/build.sh
6771 check_cppcheck
6872
6973 - name : Checkout and patch reference branch
70- if : ${{ !cancelled() && env.FATAL != 'true' && !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
74+ if : ${{ !cancelled() && env.fatal != 'true' && !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
7175 run : |
7276 git fetch origin --depth=1 "${{ inputs.ref_branch }}" &&
7377 git reset --hard origin/${{ inputs.ref_branch }} ||
@@ -103,20 +107,21 @@ jobs:
103107 done <<< "$files"
104108
105109 - name : Check dt-bindings
106- if : ${{ !cancelled() && env.FATAL != 'true' }}
110+ if : ${{ !cancelled() && env.fatal != 'true' }}
107111 run : |
108112 source ci/build.sh
109113 check_dt_binding_check
110114
111115 - name : Revert patch reference branch
112- if : ${{ !cancelled() && env.FATAL != 'true' && !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
116+ if : ${{ !cancelled() && env.fatal != 'true' && !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
113117 run : |
114118 git reset --hard $head_sha
115119
116- - name : Assert checks
120+ - name : Export labels
117121 if : ${{ !cancelled() }}
118122 id : assert
119123 run : |
120- echo "warn=$(printenv | grep ^step_warn_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT"
121- echo "fail=$(printenv | grep ^step_fail_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT"
124+ echo "fatal=$fatal" >> "$GITHUB_OUTPUT"
125+ source ci/runner_env.sh
126+ export_labels
122127
0 commit comments