ci: scope the build concurrency group per ref - #93
Merged
Conversation
The workflow-level `concurrency: {group: pages, cancel-in-progress: false}`
was shared by every ref. GitHub cancels a *pending* run in a concurrency
group as soon as a newer run queues, so whenever runs overlapped an
unrelated PR's build was cancelled -- 2 of the last 30 runs, including a
Dependabot PR.
`build` is about to become a required status check (owncloud/admin), and a
cancelled check-run is not a success, so the shared group would block merges
until a manual re-run.
Move concurrency down to the jobs:
- build: group `build-${{ github.ref }}`, cancel-in-progress: true -- a PR
build is now only superseded by a newer push to that same PR,
i.e. only for a head SHA that no merge is gated on.
- deploy: keeps the constant `pages` group with cancel-in-progress: false,
preserving the one-at-a-time Pages publish. That job only runs on
main, so it no longer contends with PR builds.
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The workflow-level
concurrency: {group: pages, cancel-in-progress: false}in.github/workflows/ci.ymlwas shared by every ref. GitHub cancels apending run in a concurrency group as soon as a newer run queues, so whenever
runs overlapped an unrelated PR's
buildwas cancelled — 2 of the last 30runs, including Dependabot PR #92:
buildis about to become a required status check for this repo (branchprotection is being wired up in
owncloud/admin). A cancelled check-run is nota success, so with the shared group a merge would intermittently be blocked
until someone re-ran the build by hand.
What
Move
concurrencyfrom the workflow down to the two jobs:cancel-in-progressbuildbuild-${{ github.ref }}truerefs/pull/<n>/merge), so a build is only ever superseded by a newer push to that same PR — i.e. only for a head SHA no merge is gated ondeploypagesfalsemain, so it no longer contends with PR buildsNo change to triggers, permissions, steps or the
deploygating condition.Verification
Merge, then confirm two or three overlapping PR builds all report
success(none
cancelled), and that a push tomainstill deploys to Pages exactlyonce.
🤖 Generated with Claude Code