From 3c4c8be22e37da3248879e76ba4ee03ed43a5a88 Mon Sep 17 00:00:00 2001 From: TrueNine Date: Mon, 23 Feb 2026 09:28:05 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=20GitHub=20Actions=20?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E7=BB=84=E5=92=8C=E6=9D=A1=E4=BB=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改 CI 和测试工作流的并发组命名规则,添加 PR 合并状态作为分组条件 增加工作流执行条件,仅在 PR 未合并时运行 --- .github/workflows/ci.yml | 3 ++- .github/workflows/test.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cef1028..9540265d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,13 @@ on: - main concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.pull_request.merged }} cancel-in-progress: true jobs: build: runs-on: ubuntu-24.04 + if: github.event.pull_request.merged == false steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd124f4f..32b62471 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,12 +6,13 @@ on: - main concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.pull_request.merged }} cancel-in-progress: true jobs: test: runs-on: ubuntu-24.04 + if: github.event.pull_request.merged == false steps: - uses: actions/checkout@v4