Skip to content

ci: cancel superseded PR runs instead of building twice - #5

Merged
StoneyJackson merged 1 commit into
mainfrom
ci/cancel-superseded-runs
Jul 27, 2026
Merged

ci: cancel superseded PR runs instead of building twice#5
StoneyJackson merged 1 commit into
mainfrom
ci/cancel-superseded-runs

Conversation

@StoneyJackson

Copy link
Copy Markdown
Member

Pushing a follow-up commit to an open PR left the previous run building both images to completion, so a branch could have two multi-GB builds in flight at once whose older result is discarded on arrival.

Only the newest commit's result gates the merge, so the older run is cancelled. Scoped per PR, so runs on different PRs never cancel each other.

Pushing a follow-up commit to an open PR left the previous run building
both images to completion, so a branch could have two multi-GB builds in
flight at once whose older result is discarded on arrival.

Only the newest commit's result gates the merge, so the older run is
cancelled. Scoped per PR, so runs on different PRs never cancel each other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 27, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Actions concurrency control to the CI workflow so that when new commits are pushed to an open PR, any older in-progress CI run for that same PR is automatically canceled. This reduces wasted time and runner/storage usage from redundant multi-GB image builds while preserving PR-level isolation (different PRs don’t cancel each other).

Changes:

  • Introduces a concurrency group keyed by PR number (with a fallback to github.ref) for the CI workflow.
  • Enables cancel-in-progress: true to cancel superseded runs automatically.
  • Documents the rationale inline in the workflow file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

🐳 PR images built (amd64 only):

  • ghcr.io/ourplcc/devcontainers/plcc-ng:pr-5
  • ghcr.io/ourplcc/devcontainers/plcc-ng-full:pr-5

To test, point a devcontainer.json image at one of these tags.

@StoneyJackson
StoneyJackson merged commit 3a4af4d into main Jul 27, 2026
6 checks passed
@StoneyJackson
StoneyJackson deleted the ci/cancel-superseded-runs branch July 27, 2026 16:17
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