Skip to content

Commit

Permalink
Fix "All required checks done" CI job to never be skipped (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi authored Aug 11, 2023
1 parent 0387369 commit 55ac314
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@ jobs:
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
if: ${{ always() }}
needs:
- lint
- test
- codeql
runs-on: ubuntu-22.04
steps:
- run: |
echo "All required checks done"
- uses: actions/github-script@v6
with:
script: |
const results = ${{ toJSON(needs.*.result) }};
if (results.every(res => res === 'success')) {
core.info('All required checks succeeded');
} else {
core.setFailed('Some required checks failed');
}

0 comments on commit 55ac314

Please sign in to comment.