This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-orbit.git


The following commit(s) were added to refs/heads/main by this push:
     new ccfd7587 CI: auto-cancel superseded PR runs (#91)
ccfd7587 is described below

commit ccfd758739c7b7ca3afbb277a39909fc93dcbd03
Author: Jan Høydahl <[email protected]>
AuthorDate: Fri Sep 18 14:47:04 2026 +0200

    CI: auto-cancel superseded PR runs (#91)
    
    None of the workflows declared a concurrency group, so pushing twice to a PR
    left both runs going to completion. Add a per-workflow, per-PR concurrency
    group with cancel-in-progress limited to pull_request events, so pushes to
    main and manual dispatches still always run to completion.
---
 .github/workflows/check-actions-usage.yml | 7 +++++++
 .github/workflows/docker-build.yml        | 7 +++++++
 .github/workflows/dockerfile-lint.yml     | 7 +++++++
 .github/workflows/docs-lint.yml           | 7 +++++++
 .github/workflows/unit-test.yml           | 7 +++++++
 5 files changed, 35 insertions(+)

diff --git a/.github/workflows/check-actions-usage.yml 
b/.github/workflows/check-actions-usage.yml
index 6a3d62ea..fbd8b639 100644
--- a/.github/workflows/check-actions-usage.yml
+++ b/.github/workflows/check-actions-usage.yml
@@ -16,6 +16,13 @@ on:
       - ".github/workflows/**"
       - ".github/actions/**"
 
+concurrency:
+  # Cancel a PR run that has been superseded by a newer push to the same PR.
+  # Pushes to main (and manual dispatches) are never cancelled: they are not
+  # superseded by anything, and a half-finished main build hides breakage.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
 permissions:
   contents: read
 
diff --git a/.github/workflows/docker-build.yml 
b/.github/workflows/docker-build.yml
index afc8eec9..88f757b0 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -25,6 +25,13 @@ on:
           - warning
           - debug
 
+concurrency:
+  # Cancel a PR run that has been superseded by a newer push to the same PR.
+  # Pushes to main (and manual dispatches) are never cancelled: they are not
+  # superseded by anything, and a half-finished main build hides breakage.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
 permissions:
   contents: read
 
diff --git a/.github/workflows/dockerfile-lint.yml 
b/.github/workflows/dockerfile-lint.yml
index 8323cba0..c8820937 100644
--- a/.github/workflows/dockerfile-lint.yml
+++ b/.github/workflows/dockerfile-lint.yml
@@ -9,6 +9,13 @@ on:
       - 'docker/*Dockerfile*'
       - '.github/workflows/dockerfile-lint.yml'
 
+concurrency:
+  # Cancel a PR run that has been superseded by a newer push to the same PR.
+  # Pushes to main (and manual dispatches) are never cancelled: they are not
+  # superseded by anything, and a half-finished main build hides breakage.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
 permissions:
   contents: read
 
diff --git a/.github/workflows/docs-lint.yml b/.github/workflows/docs-lint.yml
index 0e117767..7ad7d238 100644
--- a/.github/workflows/docs-lint.yml
+++ b/.github/workflows/docs-lint.yml
@@ -9,6 +9,13 @@ on:
       - 'docs/**'
       - '.github/workflows/docs-lint.yml'
 
+concurrency:
+  # Cancel a PR run that has been superseded by a newer push to the same PR.
+  # Pushes to main (and manual dispatches) are never cancelled: they are not
+  # superseded by anything, and a half-finished main build hides breakage.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
 permissions:
   contents: read
 
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 31812b4f..8e47f145 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -17,6 +17,13 @@ on:
       # The docs site is validated by docs-lint.yml instead.
       - 'docs/**'
 
+concurrency:
+  # Cancel a PR run that has been superseded by a newer push to the same PR.
+  # Pushes to main (and manual dispatches) are never cancelled: they are not
+  # superseded by anything, and a half-finished main build hides breakage.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
 permissions:
   contents: read
 

Reply via email to