From 06dad41ab053b8ebff5208c2ce0ac16f74e9e731 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 29 Nov 2026 17:59:43 +0000 Subject: [PATCH 1/2] Add concurrency groups to workflows that lacked one Co-Authored-By: Claude Opus 5.5 --- .github/workflows/humble-format.yaml | 5 +++++ .github/workflows/humble-pre-release.yml | 5 +++++ .github/workflows/rolling-format.yaml | 5 +++++ .github/workflows/rolling-pre-release.yml | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/.github/workflows/humble-format.yaml b/.github/workflows/humble-format.yaml index d576d6b..cca54ab 100644 --- a/.github/workflows/humble-format.yaml +++ b/.github/workflows/humble-format.yaml @@ -7,6 +7,11 @@ on: - humble push: *event +concurrency: + # cancel previous runs of the same workflow, except for pushes on given branches + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + jobs: pre-commit: name: pre-commit diff --git a/.github/workflows/humble-pre-release.yml b/.github/workflows/humble-pre-release.yml index a8a4dab..c198842 100644 --- a/.github/workflows/humble-pre-release.yml +++ b/.github/workflows/humble-pre-release.yml @@ -18,6 +18,11 @@ on: - synchronize # default - labeled # also if a label changes +concurrency: + # cancel previous runs of the same workflow, except for pushes on given branches + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + jobs: default: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-prerelease.yml@master diff --git a/.github/workflows/rolling-format.yaml b/.github/workflows/rolling-format.yaml index 6af4e98..28e8493 100644 --- a/.github/workflows/rolling-format.yaml +++ b/.github/workflows/rolling-format.yaml @@ -7,6 +7,11 @@ on: - main push: *event +concurrency: + # cancel previous runs of the same workflow, except for pushes on given branches + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + jobs: pre-commit: name: pre-commit diff --git a/.github/workflows/rolling-pre-release.yml b/.github/workflows/rolling-pre-release.yml index 7a49fd6..641d794 100644 --- a/.github/workflows/rolling-pre-release.yml +++ b/.github/workflows/rolling-pre-release.yml @@ -18,6 +18,11 @@ on: - synchronize # default - labeled # also if a label changes +concurrency: + # cancel previous runs of the same workflow, except for pushes on given branches + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + jobs: default: strategy: From f66cdfb1bc73ce31c357cf3a4b12e0ebebed42cd Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 29 Nov 2026 18:16:38 +0000 Subject: [PATCH 2/2] Use run-specific concurrency groups for non-PR runs Co-Authored-By: Claude Opus 5.5 --- .github/workflows/humble-binary-build.yml | 8 +++++--- .github/workflows/humble-debian-binary-build.yml | 8 +++++--- .github/workflows/humble-format.yaml | 8 +++++--- .github/workflows/humble-pre-release.yml | 8 +++++--- .github/workflows/humble-rhel-binary-build.yml | 8 +++++--- .github/workflows/rolling-binary-build.yml | 8 +++++--- .github/workflows/rolling-debian-binary-build.yml | 8 +++++--- .github/workflows/rolling-format.yaml | 8 +++++--- .github/workflows/rolling-pre-release.yml | 8 +++++--- .github/workflows/rolling-rhel-binary-build.yml | 8 +++++--- .github/workflows/rolling-win-binary-build.yml | 8 +++++--- 11 files changed, 55 insertions(+), 33 deletions(-) diff --git a/.github/workflows/humble-binary-build.yml b/.github/workflows/humble-binary-build.yml index 35fa832..9327024 100644 --- a/.github/workflows/humble-binary-build.yml +++ b/.github/workflows/humble-binary-build.yml @@ -10,9 +10,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: binary: diff --git a/.github/workflows/humble-debian-binary-build.yml b/.github/workflows/humble-debian-binary-build.yml index 0186773..a9501f3 100644 --- a/.github/workflows/humble-debian-binary-build.yml +++ b/.github/workflows/humble-debian-binary-build.yml @@ -7,9 +7,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: debian_binary_build: diff --git a/.github/workflows/humble-format.yaml b/.github/workflows/humble-format.yaml index cca54ab..629b50c 100644 --- a/.github/workflows/humble-format.yaml +++ b/.github/workflows/humble-format.yaml @@ -8,9 +8,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: pre-commit: diff --git a/.github/workflows/humble-pre-release.yml b/.github/workflows/humble-pre-release.yml index c198842..b64ce5b 100644 --- a/.github/workflows/humble-pre-release.yml +++ b/.github/workflows/humble-pre-release.yml @@ -19,9 +19,11 @@ on: - labeled # also if a label changes concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: default: diff --git a/.github/workflows/humble-rhel-binary-build.yml b/.github/workflows/humble-rhel-binary-build.yml index d09e33b..4de48d7 100644 --- a/.github/workflows/humble-rhel-binary-build.yml +++ b/.github/workflows/humble-rhel-binary-build.yml @@ -7,9 +7,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: rhel_binary_build: diff --git a/.github/workflows/rolling-binary-build.yml b/.github/workflows/rolling-binary-build.yml index 2d71b2f..84ae258 100644 --- a/.github/workflows/rolling-binary-build.yml +++ b/.github/workflows/rolling-binary-build.yml @@ -10,9 +10,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches branch - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: binary: diff --git a/.github/workflows/rolling-debian-binary-build.yml b/.github/workflows/rolling-debian-binary-build.yml index e18ff3b..4e900c2 100644 --- a/.github/workflows/rolling-debian-binary-build.yml +++ b/.github/workflows/rolling-debian-binary-build.yml @@ -7,9 +7,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: debian_binary_build: diff --git a/.github/workflows/rolling-format.yaml b/.github/workflows/rolling-format.yaml index 28e8493..66d94bc 100644 --- a/.github/workflows/rolling-format.yaml +++ b/.github/workflows/rolling-format.yaml @@ -8,9 +8,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: pre-commit: diff --git a/.github/workflows/rolling-pre-release.yml b/.github/workflows/rolling-pre-release.yml index 641d794..fa857c6 100644 --- a/.github/workflows/rolling-pre-release.yml +++ b/.github/workflows/rolling-pre-release.yml @@ -19,9 +19,11 @@ on: - labeled # also if a label changes concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: default: diff --git a/.github/workflows/rolling-rhel-binary-build.yml b/.github/workflows/rolling-rhel-binary-build.yml index 157bf76..cdbcd14 100644 --- a/.github/workflows/rolling-rhel-binary-build.yml +++ b/.github/workflows/rolling-rhel-binary-build.yml @@ -7,9 +7,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: rhel_binary_build: diff --git a/.github/workflows/rolling-win-binary-build.yml b/.github/workflows/rolling-win-binary-build.yml index 4c3da76..3ba442e 100644 --- a/.github/workflows/rolling-win-binary-build.yml +++ b/.github/workflows/rolling-win-binary-build.yml @@ -10,9 +10,11 @@ on: push: *event concurrency: - # cancel previous runs of the same workflow, except for pushes on given branches - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }} + # PR runs share a group per PR, so a new push cancels the superseded run. + # All other runs (push, schedule, manual) get a unique group: a group holds only one + # pending run, so sharing one would silently drop queued branch/scheduled runs. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: true jobs: binary-windows: