Skip to content

Commit

Permalink
Fail PR if one or more jobs have failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lptr committed Jun 12, 2024
1 parent b44cd4c commit 4b9b6df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,18 @@ jobs:
with:
name: test-results-${{ matrix.os }}-jni
path: file-events/build/reports/tests/testJni

# We need this to fail the PR in case any of the jobs in the matrix have failed
check-failure:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check for job failures
run: |
if grep -q '::error' ${{ github.workflow }}-*; then
echo "One or more jobs failed"
exit 1
else
echo "All jobs passed"
fi
continue-on-error: false

0 comments on commit 4b9b6df

Please sign in to comment.