👷(ci) cancel the superseded runs of a pull request

adding a concurrency group will now stop running CI if a new push is
made on the same branch.
This commit is contained in:
Manuel Raynaud
2026-09-30 14:32:38 +02:00
parent 3d510a6b72
commit a0104797f9
11 changed files with 66 additions and 0 deletions
+5
View File
@@ -9,6 +9,11 @@ on:
permissions:
contents: read
# Only the latest commit matters: a newer push cancels the run in progress.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install-dependencies:
uses: ./.github/workflows/dependencies.yml
+5
View File
@@ -9,6 +9,11 @@ on:
permissions:
contents: read
# Only the latest commit matters: a newer push cancels the run in progress.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install-dependencies:
uses: ./.github/workflows/dependencies.yml
+8
View File
@@ -19,6 +19,14 @@ env:
permissions:
contents: read
# One run per pull request, cancelled by a newer push. On a branch or a tag
# the runs are queued instead of cancelled: an image push or the Argo CD
# notification is never stopped halfway, and two runs never race to push the
# same tag (only the latest pending run is kept).
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-push-backend:
uses: ./.github/workflows/docker-publish.yml
+8
View File
@@ -16,6 +16,14 @@ env:
permissions:
contents: read
# One run per pull request, cancelled by a newer push. On a branch or a tag
# the runs are queued instead of cancelled: an image push or the Argo CD
# notification is never stopped halfway, and two runs never race to push the
# same tag (only the latest pending run is kept).
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-push-backend:
runs-on: ubuntu-latest
+7
View File
@@ -7,6 +7,13 @@ on:
branches:
- 'main'
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
helmfile-lint:
runs-on: ubuntu-latest
+7
View File
@@ -11,6 +11,13 @@ on:
permissions:
contents: read
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
install-dependencies:
+7
View File
@@ -11,6 +11,13 @@ on:
permissions:
contents: read
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
install-dependencies:
uses: ./.github/workflows/dependencies.yml
+4
View File
@@ -7,6 +7,10 @@ on:
permissions:
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
comment:
runs-on: ubuntu-latest
+7
View File
@@ -15,6 +15,13 @@ permissions:
# swarm and canary are standalone TypeScript packages, each with its own
# package.json and yarn.lock, like src/yhub-server; k6 runs plain scripts and
# the dashboards are generated by a python script.
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
lint-and-test-loadtest:
runs-on: ubuntu-latest
+7
View File
@@ -19,6 +19,13 @@ defaults:
run:
working-directory: src/yhub-server
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
lint-yhub:
runs-on: ubuntu-latest
+1
View File
@@ -10,6 +10,7 @@ and this project adheres to
- 👷(ci) lint, typecheck, build and test the collaboration server (yhub)
- 👷(ci) check the load-test tooling: swarm, canary, k6 and dashboards
- 👷(ci) cancel the superseded runs of a pull request
- ✨(backend) add mention endpoint with cooldown-limited email
notification #2447
- 🚩(setting) add feature flag on Duplicate with Children #2721