From 8dc07cc466752545c69f22247cb02597ef5eabb4 Mon Sep 17 00:00:00 2001 From: Ulysses Tiberious <132908333+utiberious@users.noreply.github.com> Date: Sat, 4 Apr 2026 21:36:48 +0800 Subject: [PATCH] ci: fix concurrency group to use github.ref as fallback github.head_ref is only set for pull_request events; it is empty for push-to-master and tag events. When two push events land in quick succession (e.g. merge commit + release tag), both go into the same unnamed group 'test-' and the second cancels the first, causing the master badge to show 'cancelled'. Using `github.head_ref || github.ref` gives each branch/tag its own concurrency group while keeping the cancel-in-progress behaviour for PRs (where head_ref is 'refs/pull/NNN/merge', unique per PR). --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3465d986..e7f49838 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: pull_request: concurrency: - group: test-${{ github.head_ref }} + group: test-${{ github.head_ref || github.ref }} cancel-in-progress: true env: