Skip to content

Commit 70f8f68

Browse files
committed
[ci] fail merge blockers quickly when jobs failed
Currently when the required job failed, the merge blockers are skipped and the merge will fail after a timeout. Change to let the merge blocker still evaluate and fail fast when this happens. Signed-off-by: Gary Guo <[email protected]>
1 parent c5424c3 commit 70f8f68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,16 +807,16 @@ jobs:
807807
name: Merge blocker${{ github.event_name != 'pull_request' && ' (skipped)' || '' }}
808808
runs-on: ubuntu-latest
809809
needs: quick_lint
810-
if: ${{ github.event_name == 'pull_request' }}
810+
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
811811
steps:
812812
- name: Complete
813-
run: 'true'
813+
run: ${{ needs.quick_lint.result == 'success' }}
814814

815815
merge_blocker_merge:
816816
name: Merge blocker${{ github.event_name != 'merge_group' && ' (skipped)' || '' }}
817817
runs-on: ubuntu-latest
818818
needs: cache_bitstreams
819-
if: ${{ github.event_name == 'merge_group' }}
819+
if: ${{ !cancelled() && github.event_name == 'merge_group' }}
820820
steps:
821821
- name: Complete
822-
run: 'true'
822+
run: ${{ needs.cache_bitstreams.result == 'success' }}

0 commit comments

Comments
 (0)