Skip to content

ci: delete merged branches and cancel their in-flight runs - #402

Merged
Minipada merged 1 commit into
jazzyfrom
ci/cleanup-merged-branches
Aug 19, 2026
Merged

ci: delete merged branches and cancel their in-flight runs#402
Minipada merged 1 commit into
jazzyfrom
ci/cleanup-merged-branches

Conversation

@Minipada

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/cleanup-branches.yml, triggered on PR close: cancels any queued/in-flight runs still targeting the closed branch, then deletes the branch once merged.
  • Ported from the equivalent job in ~/dev/monorepo (cleanup-branches.yml), trimmed down: this repo has no self-hosted runner or RustFS artifact store, so the run-cancellation and branch-deletion steps use the gh CLI (preinstalled on ubuntu-latest) instead of curl+jq, and the RustFS/CI-artifact/recipe-PDF/APK purge steps (monorepo-specific) are dropped entirely.
  • Chose a workflow over the repo's "Automatically delete head branches" setting (currently off) since the workflow also cancels in-flight runs against the deleted branch, which the repo setting alone doesn't do.

Test plan

  • CI (format.yaml) passes YAML/lint checks on this PR
  • After merge, confirm on the next merged PR that: (1) the branch is deleted, (2) any run still queued/in-progress for that branch gets cancelled

🤖 Generated with Claude Code

https://claude.ai/code/session_018THWRsSmNBEzYiRJ58bLG3

Mirrors the pattern from the monorepo's cleanup-branches.yml, trimmed to
what applies here (no self-hosted runner, no RustFS artifact store): on
PR close, cancel any queued/in-flight runs still targeting the branch,
then delete the branch once merged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018THWRsSmNBEzYiRJ58bLG3
Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
@Minipada
Minipada merged commit 7d4ad79 into jazzy Aug 19, 2026
5 of 6 checks passed
@github-actions
github-actions Bot deleted the ci/cleanup-merged-branches branch August 19, 2026 20:32
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.

1 participant