From c6be5bacf6b8ee415b5273c449a18f7b53c33ae7 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Thu, 24 Sep 2026 03:53:34 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=A3=80=E5=87=BA=E5=85=BC=E5=AE=B9=20AG?= =?UTF-8?q?it=20PR=20=E7=9A=84=20refs/pull/N/head(clone=20--branch=20?= =?UTF-8?q?=E5=8F=AA=E8=AE=A4=E5=88=86=E6=94=AF=E5=90=8D,=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20fetch=20=E5=90=8E=20checkout)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 192c596..3f79aa4 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,7 +12,10 @@ jobs: - name: 检出代码 run: | REF="${{ github.event.pull_request.head.ref || github.ref_name }}" - git clone --depth 1 --branch "$REF" "${{ github.server_url }}/${{ github.repository }}.git" . + git clone --depth 1 "${{ github.server_url }}/${{ github.repository }}.git" . + # PR head 可能是完整 ref(AGit 建的 PR 为 refs/pull/N/head),clone --branch 只认分支名,改 fetch 后 checkout + git fetch --depth 1 origin "$REF" + git checkout --detach FETCH_HEAD - name: 安装 uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: 安装依赖