ci: 使用 git clone 替代 actions/checkout
Some checks failed
Build Windows / Build Windows (push) Failing after 2s

原因:
- actions/checkout@v4 可能在 Gitea 中不兼容

修复:
- 使用 git clone 直接获取代码
- 使用 ${{ gitea.sha }} 指定 commit
This commit is contained in:
大麦
2026-03-10 19:46:20 +08:00
parent 5b3d1af415
commit 075eedc13b

View File

@@ -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