From a084203b032d4a64db17e14994d03292f6ed3448 Mon Sep 17 00:00:00 2001 From: njord Date: Sat, 18 Jul 2026 09:49:02 -0500 Subject: [PATCH] ci: cancel superseded workflow runs on PR pushes Add a top-level concurrency group (github.workflow + github.ref) to the push/pull_request workflows that lacked one, cancelling in-progress runs only for pull_request events. Reduces wasted runner minutes from superseded PR pushes while staying safe for main/tag release paths. Part of the org CI-cost audit. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 4 ++++ .github/workflows/publish.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b620f2d..ccc7896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 192750b..e5f6002 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,10 @@ on: - main workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: runs-on: ubuntu-latest