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 d576d6b..629b50c 100644 --- a/.github/workflows/humble-format.yaml +++ b/.github/workflows/humble-format.yaml @@ -7,6 +7,13 @@ on: - humble push: *event +concurrency: + # 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: name: pre-commit diff --git a/.github/workflows/humble-pre-release.yml b/.github/workflows/humble-pre-release.yml index a8a4dab..b64ce5b 100644 --- a/.github/workflows/humble-pre-release.yml +++ b/.github/workflows/humble-pre-release.yml @@ -18,6 +18,13 @@ on: - synchronize # default - labeled # also if a label changes +concurrency: + # 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: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-prerelease.yml@master 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 6af4e98..66d94bc 100644 --- a/.github/workflows/rolling-format.yaml +++ b/.github/workflows/rolling-format.yaml @@ -7,6 +7,13 @@ on: - main push: *event +concurrency: + # 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: name: pre-commit diff --git a/.github/workflows/rolling-pre-release.yml b/.github/workflows/rolling-pre-release.yml index 7a49fd6..fa857c6 100644 --- a/.github/workflows/rolling-pre-release.yml +++ b/.github/workflows/rolling-pre-release.yml @@ -18,6 +18,13 @@ on: - synchronize # default - labeled # also if a label changes +concurrency: + # 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: strategy: 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: