From dbee971ab97c03a2fd488d44ca6a0ae10700b680 Mon Sep 17 00:00:00 2001 From: sudlud Date: Tue, 6 Jan 2026 17:31:58 +0100 Subject: [PATCH] fix(CI): adjust concurrency to cancel pending CIs on merge (#24258) --- .github/workflows/core-build-nopch.yml | 9 ++++++++- .github/workflows/core-build-pch.yml | 9 ++++++++- .github/workflows/core_modules_build.yml | 9 ++++++++- .github/workflows/dashboard-ci.yml | 9 ++++++++- .github/workflows/docker_build.yml | 9 ++++++++- .github/workflows/tools_build.yml | 9 ++++++++- .github/workflows/windows_build.yml | 9 ++++++++- 7 files changed, 56 insertions(+), 7 deletions(-) diff --git a/.github/workflows/core-build-nopch.yml b/.github/workflows/core-build-nopch.yml index e67e9463c..56f0a6a2d 100644 --- a/.github/workflows/core-build-nopch.yml +++ b/.github/workflows/core-build-nopch.yml @@ -10,7 +10,14 @@ on: - synchronize concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: diff --git a/.github/workflows/core-build-pch.yml b/.github/workflows/core-build-pch.yml index 8a752e450..3ac8cc6fd 100644 --- a/.github/workflows/core-build-pch.yml +++ b/.github/workflows/core-build-pch.yml @@ -10,7 +10,14 @@ on: - synchronize concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: diff --git a/.github/workflows/core_modules_build.yml b/.github/workflows/core_modules_build.yml index 1ae3a1c02..322c06385 100644 --- a/.github/workflows/core_modules_build.yml +++ b/.github/workflows/core_modules_build.yml @@ -24,7 +24,14 @@ permissions: contents: read concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml index 9e92a909f..9bd89eced 100644 --- a/.github/workflows/dashboard-ci.yml +++ b/.github/workflows/dashboard-ci.yml @@ -16,7 +16,14 @@ on: workflow_dispatch: concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index eee506a14..e770e0eae 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -9,7 +9,14 @@ on: - synchronize concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml index 5ad3bf3bf..dbd8eba50 100644 --- a/.github/workflows/tools_build.yml +++ b/.github/workflows/tools_build.yml @@ -9,7 +9,14 @@ on: - synchronize concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index c01e3ff3c..c23c87be1 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -9,7 +9,14 @@ on: - synchronize concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + # One concurrency group per workflow + ref. + # + # - PRs use `refs/pull//merge`, so new commits cancel older + # in-progress runs for the same PR. + # - When a PR is merged, a push to the target branch starts a new group, + # canceling any still-running PR CI. + # - Branch pushes are isolated by ref. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: