File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 9898 if : always()
9999 runs-on : ubuntu-latest
100100 steps :
101- - name : Previous jobs succeeded
102- if : ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
103- run : exit 0
104- - name : Previous jobs failed
105- if : ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
106- run : exit 1
101+ # Calculate the exit status of the whole CI workflow.
102+ # If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
103+ # If a some dependent job has failed, this exits with 1.
104+ - name : calculate the correct exit status
105+ run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
You can’t perform that action at this time.
0 commit comments