Skip to content

Commit 5844048

Browse files
authored
ci: tolerate skipped build in ci-pass gate (#2190)
The ci-pass step treated needs.build.result != "success" as failure, which made every release-bot push fail: build's own if: skips on ci(release) commits to prevent publish loops, so build.result is "skipped" by design on those runs. Replace the per-job result checks with the standard contains pattern over needs.*.result. Failure and cancelled still fail the gate; skipped is tolerated symmetrically for build and integration. New needed jobs added later inherit the rule without further edits.
1 parent 1f0de40 commit 5844048

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,8 @@ jobs:
123123
if: always()
124124
runs-on: ubuntu-latest
125125
steps:
126-
- run: |
127-
if [ "${{ needs.build.result }}" != "success" ]; then
128-
echo "Build failed or was cancelled"
129-
exit 1
130-
fi
131-
if [ "${{ needs.integration.result }}" != "success" ] && [ "${{ needs.integration.result }}" != "skipped" ]; then
132-
echo "Integration tests failed or were cancelled"
133-
exit 1
134-
fi
126+
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
127+
run: exit 1
135128

136129
publish:
137130
needs: [build, integration]

0 commit comments

Comments
 (0)