diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc9ccb089..12a8a340ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -445,9 +445,14 @@ jobs: # Used to signal to branch protections that all other jobs have succeeded. all-jobs-succeed: name: All checks succeeded - if: success() + # On failure, we run and unconditionally exit with a failing status code. + # On success, this job is skipped. Jobs skipped using `if:` are considered + # to have succeeded: + # + # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks + if: failure() runs-on: ubuntu-latest needs: [build_test, kani, check_fmt, check_readme, check_msrv, check_versions, generate_cache] steps: - - name: Mark the job as successful - run: exit 0 + - name: Mark the job as failed + run: exit 1