Skip to content

Commit

Permalink
Add a "bors" summary status
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jun 7, 2024
1 parent e748fc1 commit 3c583c7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,18 @@ jobs:
env:
TARGET: ${{ matrix.target }}
run: ./ci/script.sh

# One job that "summarizes" the success state of this pipeline. This can then be added to branch
# protection, rather than having to add each job separately.
success:
name: bors
runs-on: ubuntu-latest
needs: [tests]
# 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 3c583c7

Please sign in to comment.