ci(gitea): 检出改为从内网 Gitea 克隆,绕开 github.com 拉 actions/checkout
deploy-132 / deploy (push) Failing after 33s

内网 runner 连不上 github.com,actions/checkout@v4 下载 action 时 unexpected EOF。
改用 git init+fetch 从 git.sundynix.cn(同内网必达)拉当前分支,用工作流自带
github.token 认证,不再依赖 github.com。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-18 15:47:33 +08:00
parent 7cacfdb5a3
commit 84a32023ee
+8 -2
View File
@@ -16,8 +16,14 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest # 须匹配 128 上已注册 runner 的标签;不符请改成你的标签 runs-on: ubuntu-latest # 须匹配 128 上已注册 runner 的标签;不符请改成你的标签
steps: steps:
- name: 检出代码 # 不用 actions/checkout(它要去 github.com 下载 action,内网 runner 连不上会 EOF);
uses: actions/checkout@v4 # 直接从内网 Gitea 用工作流自带 token 拉本仓库当前分支。init+fetch 不怕工作目录非空。
- name: 检出代码(内网 Gitea
run: |
git init -q .
git remote add origin "https://token:${{ github.token }}@git.sundynix.cn/${{ github.repository }}.git"
git fetch -q --depth 1 origin "${{ github.ref_name }}"
git checkout -q FETCH_HEAD
- name: 构建 4 个应用镜像(在 runner 上) - name: 构建 4 个应用镜像(在 runner 上)
run: | run: |