Skip to content

ci: add concurrency groups to cancel redundant workflow runs#5373

Merged
thomhurst merged 1 commit intomainfrom
ci/cancel-redundant-workflow-runs
Apr 4, 2026
Merged

ci: add concurrency groups to cancel redundant workflow runs#5373
thomhurst merged 1 commit intomainfrom
ci/cancel-redundant-workflow-runs

Conversation

@thomhurst
Copy link
Copy Markdown
Owner

Summary

  • Adds concurrency groups with cancel-in-progress: true to 7 GitHub Actions workflows that use push/pull_request triggers
  • When a new commit is pushed to a PR branch, any in-progress run for that branch is automatically cancelled, saving runner time
  • Uses github.head_ref || github.run_id so PR runs are grouped by branch while push/schedule/dispatch runs remain independent

Workflows updated

  • .NET (dotnet.yml)
  • Locale Test (dotnet-build-different-locale.yml)
  • CloudShop Example Tests (cloudshop-example.yml)
  • CodeQL Advanced (codeql.yml)
  • Deploy to GitHub Pages (deploy-pages.yml)
  • Test Deploy to GitHub Pages (deploy-pages-test.yml)
  • Claude Code Review (claude-code-review.yml)

Skipped (no benefit)

  • mock-benchmarks.yml — already has concurrency configured
  • Schedule/event-only workflows (speed-comparison, claude-autofix, review-stale, claude-issue-triage, claude)

Test plan

  • Verify workflow YAML is valid (CI will validate on this PR)
  • Push a follow-up commit to this PR to confirm the first run gets cancelled

Prevents redundant CI runs when new commits are pushed to a PR branch,
saving runner time and reducing queue contention.
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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