diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 988b644..aaa4196 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,9 +10,16 @@ jobs: runs-on: aarch64-clang steps: - name: checkout - # 不用 actions/checkout:本机拉不到 GitHub,而且这个镜像本来就不需要 + # Use the local Git client so the runner only needs to reach Gitea. + env: + REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository }}.git + REVISION: ${{ github.sha }} + EVENT_REF: ${{ github.ref }} run: | - git clone --depth 1 https://gitea.starcells.ltd/dsh/R8Forge.git . + git init . + git remote add origin "$REPOSITORY_URL" + git fetch --depth 1 origin "$REVISION" || git fetch --depth 1 origin "$EVENT_REF" + git checkout --detach "$REVISION" git log --oneline -1 - name: toolchain