Skip to content

ci: scope the build concurrency group per ref - #93

Merged
DeepDiver1975 merged 1 commit into
mainfrom
ci/scope-build-concurrency-per-ref
Aug 21, 2026
Merged

ci: scope the build concurrency group per ref#93
DeepDiver1975 merged 1 commit into
mainfrom
ci/scope-build-concurrency-per-ref

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Why

The workflow-level concurrency: {group: pages, cancel-in-progress: false} in
.github/workflows/ci.yml 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 Dependabot PR #92:

159 pull_request dependabot/npm_and_yarn/npm-minor-patch-  concl=cancelled
154 pull_request docs/ocis-8.1-updates                    concl=cancelled

build is about to become a required status check for this repo (branch
protection is being wired up in owncloud/admin). A cancelled check-run is not
a success, so with the shared group a merge would intermittently be blocked
until someone re-ran the build by hand.

What

Move concurrency from the workflow down to the two jobs:

job group cancel-in-progress effect
build build-${{ github.ref }} true unique per PR (refs/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 on
deploy pages false unchanged serialised Pages publish; the job only runs on main, so it no longer contends with PR builds

No change to triggers, permissions, steps or the deploy gating condition.

Verification

Merge, then confirm two or three overlapping PR builds all report success
(none cancelled), and that a push to main still deploys to Pages exactly
once.

🤖 Generated with Claude Code

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>
@DeepDiver1975
DeepDiver1975 merged commit e32d958 into main Aug 21, 2026
@DeepDiver1975
DeepDiver1975 deleted the ci/scope-build-concurrency-per-ref branch August 21, 2026 08:06
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