chore: "passed" fails if any previous jobs fail or are cancelled (#5776)

For the purposes of being able to merge a PR, Github Actions jobs count as passed if they ran and passed, or were skipped.

With this change, if any of the jobs that "passed" depends on fail or are cancelled, then "passed" will fail. If they all succeed or are skipped, then "passed" is skipped, which does not prevent a merge.

This saves spinning up a runner in the usual case where things work, and will simplify our branch protection rules, so that only "passed" will need to be checked.
This commit is contained in:
Ed Hennis
2025-09-09 14:07:04 -04:00
committed by GitHub
parent f1eaa6a264
commit 148f669a25

View File

@@ -125,11 +125,12 @@ jobs:
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
passed:
if: failure() || cancelled()
needs:
- build-test
- check-format
- check-levelization
runs-on: ubuntu-latest
steps:
- name: No-op
run: true
- name: Fail
run: false