From a01ec8d29cfbfad2ecfe8ea73788abf410e29e34 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 15 Apr 2026 13:17:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8DPR=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E7=9A=84=E5=9F=BA=E7=BA=BF=E5=92=8C=E5=A4=B4=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将基础提交哈希从 github.event.before 更新为 github.event.pull_request.base.sha - 将当前提交哈希从 github.sha 更新为 github.event.pull_request.head.sha - 确保PR工作流正确比较基线和目标分支的差异 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bb32d49..c9bfcf89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,9 +67,9 @@ jobs: # 扫描路径,. 表示扫描整个仓库 path: . # 基础提交哈希,用于与当前提交进行比较 - base: ${{ github.event.before }} + base: ${{ github.event.pull_request.base.sha }} # 当前提交哈希,作为扫描的目标版本 - head: ${{ github.sha }} + head: ${{ github.event.pull_request.head.sha }} # 构建和测试 job(并行执行) build-and-test: