Skip to content

Commit 24eee8a

Browse files
authored
ci: Make it so that the workflow fails is any job fails (#349)
This is the same setup we have in other Servo repositories.
1 parent 6aa857c commit 24eee8a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,17 @@ jobs:
8585
build_result:
8686
name: Result
8787
runs-on: ubuntu-latest
88+
if: always()
8889
needs:
8990
- "linux-ci"
9091
- "mac-ci"
9192
- "windows-ci"
9293

9394
steps:
94-
- name: Mark the job as successful
95+
- name: Success
9596
run: exit 0
96-
if: success()
97-
- name: Mark the job as unsuccessful
97+
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
98+
- name: Failure
9899
run: exit 1
99-
if: "!success()"
100+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
100101

0 commit comments

Comments
 (0)