From 81eaeb5d5f02db83b648c0399ee85c0884fec455 Mon Sep 17 00:00:00 2001 From: Syngnat Date: Fri, 5 Jun 2026 17:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ci):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?dev=20=E9=A9=B1=E5=8A=A8=E5=85=A8=E9=87=8F=E9=87=8D=E5=BB=BA?= =?UTF-8?q?=E5=9F=BA=E7=BA=BF=E6=9C=AA=E9=80=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 compare_base 从 driver 检测阶段透传到 build job - 强制全量重建时不再回退到旧 source_commit 做平台 diff - 避免 dev driver release 成功发布但仍夹带旧 standalone 资产 --- .github/workflows/dev-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 1f42e14..73909eb 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -70,6 +70,7 @@ jobs: drivers: ${{ steps.detect.outputs.drivers }} has_changes: ${{ steps.detect.outputs.has_changes }} release_source: ${{ steps.detect.outputs.release_source }} + compare_base: ${{ steps.detect.outputs.compare_base }} source_commit: ${{ steps.published_source.outputs.source_commit }} has_manifest: ${{ steps.published_source.outputs.has_manifest }} steps: @@ -184,6 +185,7 @@ jobs: fi fi echo "drivers=${DRIVERS}" >> "$GITHUB_OUTPUT" + echo "compare_base=${BASE_REF}" >> "$GITHUB_OUTPUT" if [ -n "$DRIVERS" ]; then echo "has_changes=true" >> "$GITHUB_OUTPUT" echo "🧭 Changed driver agents: $DRIVERS" @@ -448,11 +450,11 @@ jobs: shell: bash run: | set -euo pipefail - BASE_REF="${{ needs.driver_agents.outputs.source_commit }}" + BASE_REF="${{ needs.driver_agents.outputs.compare_base }}" FALLBACK_DRIVERS="${{ needs.driver_agents.outputs.drivers }}" - if [[ -z "$BASE_REF" ]]; then - echo "⚠️ 未拿到已发布 driver release 源码提交,回退使用全局检测结果:${FALLBACK_DRIVERS}" + if [[ -z "$BASE_REF" || "$BASE_REF" == "all" ]]; then + echo "⚠️ 当前 driver 检测基线不可做平台 diff,回退使用全局检测结果:${FALLBACK_DRIVERS}" echo "drivers=${FALLBACK_DRIVERS}" >> "$GITHUB_OUTPUT" else echo "🧭 对比当前平台 revision:base=${BASE_REF} head=${GITHUB_SHA} platform=${{ matrix.platform }}"