From dae59ff438a75d5478d155fa3b052ed7f23dac3d Mon Sep 17 00:00:00 2001 From: Kyle Tse Date: Wed, 30 Sep 2026 01:01:42 +0000 Subject: [PATCH] ci: cancel superseded PR runs natively (concurrency per PR) --- .github/workflows/bench.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/demo.yml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 204ca7a..c5b4751 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -24,7 +24,7 @@ permissions: # One run at a time: Context7's anonymous quota is shared. concurrency: group: bench-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: bench: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 547379c..1ebd26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ permissions: concurrency: group: ci-${{ github.event.pull_request.number || github.event.merge_group.head_sha || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: plain-language: diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index b7edd06..e575b01 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -11,6 +11,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: record: runs-on: ubuntu-latest