From 075eedc13b886f857389732e8ec4b3acdd04f74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E9=BA=A6?= Date: Tue, 10 Mar 2026 19:46:20 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BD=BF=E7=94=A8=20git=20clone=20?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20actions/checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因: - actions/checkout@v4 可能在 Gitea 中不兼容 修复: - 使用 git clone 直接获取代码 - 使用 ${{ gitea.sha }} 指定 commit --- .gitea/workflows/build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index e189a8d..2c68e25 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -11,9 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check out repository code - uses: actions/checkout@v4 - + # 使用 git clone 而非 actions/checkout + - name: Clone repository + run: | + URL="${GITEA_SERVER_URL}/${GITEA_REPOSITORY}.git" + git clone $URL . + git checkout ${{ gitea.sha }} + - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal