Skip to content

ci(pr-checks): cancel runs on PR close and add skip_build_test option#1418

Merged
kaizhou-lab merged 1 commit intomainfrom
zynx/fix/cancel-pr-checks-on-merge
Mar 18, 2026
Merged

ci(pr-checks): cancel runs on PR close and add skip_build_test option#1418
kaizhou-lab merged 1 commit intomainfrom
zynx/fix/cancel-pr-checks-on-merge

Conversation

@piorpua
Copy link
Copy Markdown
Contributor

@piorpua piorpua commented Mar 18, 2026

Summary

  • Add pull_request: [closed] trigger + cancel-if-closed lightweight job so concurrency automatically cancels in-progress runs when a PR is merged or manually closed
  • Add skip_build_test boolean input to workflow_dispatch so manual re-runs can skip the ~45 min build test job
  • Guard all existing jobs with github.event.action != 'closed' to prevent them from running on the closed event

Test plan

  • Merge an open PR while its PR Checks run is in progress — verify the run is automatically cancelled
  • Manually trigger PR Checks with skip_build_test: true — verify the Build Test job shows as skipped
  • Open/push a normal PR — verify all existing jobs still run as before
  • Edit a PR description — verify all jobs are still skipped (existing behaviour unchanged)

- Add pull_request closed trigger so concurrency cancels in-progress
  runs when a PR is merged or manually closed
- Add cancel-if-closed lightweight job that triggers the cancellation
- Add skip_build_test boolean input for workflow_dispatch to allow
  skipping the ~45 min build test job on manual re-runs
- Guard all non-cancel jobs against closed event to prevent false runs
@kaizhou-lab kaizhou-lab merged commit ec5165d into main Mar 18, 2026
9 of 17 checks passed
@piorpua piorpua deleted the zynx/fix/cancel-pr-checks-on-merge branch March 18, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants