From 6800384f9af1fdeaf1984429db1d527288c5feed Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Thu, 17 Sep 2026 09:10:55 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=A3=80=E5=87=BA=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=9B=B4=E6=8E=A5=20clone=20Gitea,=20?= =?UTF-8?q?=E6=91=86=E8=84=B1=E5=AF=B9=20github.com=20=E7=9A=84=E4=BE=9D?= =?UTF-8?q?=E8=B5=96(action=20=E4=B8=8B=E8=BD=BD=E8=B6=85=E6=97=B6)?= 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 feef89f..192c596 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -8,8 +8,11 @@ jobs: name: test runs-on: ubuntu-latest steps: + # 不用 actions/checkout: 它需从 github.com 拉取, 本网络不稳, 改为直接 clone Gitea - name: 检出代码 - uses: actions/checkout@v4 + run: | + REF="${{ github.event.pull_request.head.ref || github.ref_name }}" + git clone --depth 1 --branch "$REF" "${{ github.server_url }}/${{ github.repository }}.git" . - name: 安装 uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: 安装依赖