Skip to content

Commit 270cc9f

Browse files
committed
ci: cancel-in-progress on all refs — new commit supersedes running build; publish rollback trap + head guards cover interruption
1 parent d50736a commit 270cc9f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ on:
99
permissions:
1010
contents: read
1111

12-
# main/master 使用发布锁,历史 run 的误重跑不能并发改 Release;其他 ref 只保留最新验证。
12+
# 所有 ref 统一:新提交到达即取消同 ref 在跑的旧 run。
13+
# main 的 publish 步骤有回滚 trap 兜底中断态,且发布头检查会拒绝过期 run。
1314
concurrency:
14-
group: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && 'rolling-release' || format('ci-{0}', github.ref) }}
15-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}
15+
group: ${{ format('ci-{0}', github.ref) }}
16+
cancel-in-progress: true
1617

1718
jobs:
1819
verify:

0 commit comments

Comments
 (0)