Skip to content

Commit 39b6df9

Browse files
KobzolAmanieu
authored andcommitted
CI: add a success conclusion job
1 parent 9c794a5 commit 39b6df9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,20 @@ jobs:
225225
- name: Install Rust
226226
run: rustup update nightly && rustup default nightly
227227
- run: ./ci/build-std-detect.sh
228+
229+
success:
230+
needs:
231+
- docs
232+
- verify
233+
- env_override
234+
- test
235+
- build-std-detect
236+
runs-on: ubuntu-latest
237+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
238+
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
239+
# dependencies fails.
240+
if: always() # make sure this is never "skipped"
241+
steps:
242+
# Manually check the status of all dependencies. `if: failure()` does not work.
243+
- name: check if any dependency failed
244+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)