Skip to content

Commit

Permalink
Check status of precursor jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeepyjack committed Nov 10, 2023
1 parent df2ea4d commit 4843cd3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,20 @@ jobs:

# This job is the final job that runs after all other jobs and is used for branch protection status checks.
# See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101
ci-success:
runs-on: ubuntu-latest
name: CI success
if: ${{ always() }} # need to use always() instead of !cancelled() because skipped jobs count as success
needs:
- ci
- verify-devcontainers
steps:
- run: echo "CI success"
- name: Check status of all precursor jobs
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}
run: exit 1

0 comments on commit 4843cd3

Please sign in to comment.