From d16141b6451849a9f028496dc866fd3a50de74f5 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 09:02:07 +0000 Subject: [PATCH 1/2] ci: one build per branch, a newer push cancels the older run (#90) --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 032ba6de..1022e86f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,13 @@ on: required: false type: string +# One run per branch (and event): a newer push cancels the older run, so on basic / v2 the +# "latest" release always gets the build of the newest commit, not of the run that finished +# last (#90). Manual runs have their own group and are never cancelled by a push. +concurrency: + group: build-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }} + jobs: # Unit tests and lint; also runs for pull requests from forks (no secrets needed) test: From feca2d20bfae32240fb7da1e5259063e5c10c47b Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 09:09:19 +0000 Subject: [PATCH 2/2] ci: a concurrency group per manual run (Qodo on #105) --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1022e86f..4e350d3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,10 @@ on: # One run per branch (and event): a newer push cancels the older run, so on basic / v2 the # "latest" release always gets the build of the newest commit, not of the run that finished -# last (#90). Manual runs have their own group and are never cancelled by a push. +# last (#90). Every manual run has a group of its own: never cancelled, never replaced by +# another manual run waiting in the same group. concurrency: - group: build-${{ github.event_name }}-${{ github.ref }} + group: ${{ github.event_name == 'workflow_dispatch' && format('manual-{0}', github.run_id) || format('build-{0}-{1}', github.event_name, github.ref) }} cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }} jobs: