Skip to content

Commit 681c29a

Browse files
authored
ci: fix success job (#32)
GitHub considers skipped jobs as fulfilling requirements when merging pull requests. We need to ensure that the success job fails if any previous job has failed.
1 parent 3964867 commit 681c29a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,17 @@ jobs:
6464
success:
6565
name: Success
6666
runs-on: ubuntu-latest
67-
if: ${{ success() }}
67+
if: ${{ always() }}
6868
needs:
6969
- formatting
7070
- checks
7171

7272
steps:
7373
- name: CI succeeded
74+
id: succeeded
75+
if: ${{ !contains(needs.*.result, 'failure') }}
7476
run: exit 0
77+
78+
- name: CI failed
79+
if: ${{ steps.succeeded.outcome == 'skipped' }}
80+
run: exit 1

0 commit comments

Comments
 (0)