Skip to content

Commit ad6fcd8

Browse files
authored
Fix join github actions job (#944)
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 8135271 commit ad6fcd8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/ValidatePullRequest.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ jobs:
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) }}'

0 commit comments

Comments
 (0)