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 e67e9463c9..56f0a6a2d8 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 8a752e450f..3ac8cc6fdc 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 1ae3a1c027..322c063851 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 9e92a909f9..9bd89eced8 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 eee506a149..e770e0eae6 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 5ad3bf3bfd..dbd8eba50b 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 c01e3ff3cb..c23c87be1c 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: