Skip to content

Commit

Permalink
Add success job
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol authored and michaelwoerister committed Jan 24, 2024
1 parent 72e8a45 commit 93ce1e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ jobs:
run: cargo doc --verbose --no-deps
- name: Check big endian
run: cargo check --target powerpc64-unknown-linux-gnu --verbose --all
success:
needs:
- build
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 93ce1e4

Please sign in to comment.