Skip to content

Commit

Permalink
CI: add a success conclusion job
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol authored and Amanieu committed Jan 26, 2024
1 parent 9c794a5 commit 39b6df9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,20 @@ jobs:
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: ./ci/build-std-detect.sh

success:
needs:
- docs
- verify
- env_override
- test
- build-std-detect
runs-on: ubuntu-latest
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 comments on commit 39b6df9

Please sign in to comment.