From 6c6d621dfe8784f99a0eddaee94bb22a823503b0 Mon Sep 17 00:00:00 2001 From: Elton Gao Date: Tue, 17 Sep 2024 21:08:40 -0400 Subject: [PATCH] Fix new PR cancel previous PR's workflow (#918) see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-only-cancel-in-progress-jobs-on-specific-branches --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6fa86386..2d39b228 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ on: # One active job per PR, cancel older ones on push concurrency: - group: ${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true # NOTE: because matrix cannot easily be shared across jobs, it should be copied to each job