mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-01 05:55:16 +02:00
👷(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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user