Skip to content

Commit

Permalink
Fix "All required checks done" CI job to never be skipped (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi authored Aug 11, 2023
1 parent b66843d commit de5e150
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,21 @@ 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:
- check-format
- test-nuget
runs-on: ubuntu-latest
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');
}
# Create a GitHub release and publish the NuGet packages to nuget.org when a tag is pushed.
publish-release:
Expand Down

0 comments on commit de5e150

Please sign in to comment.