Skip to content

Commit

Permalink
Add job to test if all build jobs succeeded
Browse files Browse the repository at this point in the history
This can be used as required status for branch protection rules.
  • Loading branch information
darkdragon-001 committed Aug 5, 2024
1 parent c0e0fa1 commit 5bc900e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@ concurrency:
jobs:
build:
uses: ./.github/workflows/build.yaml

# Check if all important jobs passed
# This can be used as required status for branch protection rules.
pr-ok:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

0 comments on commit 5bc900e

Please sign in to comment.