diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index dc23599..e5d4ee5 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,8 +16,14 @@ jobs: deploy: runs-on: ubuntu-latest # 须匹配 128 上已注册 runner 的标签;不符请改成你的标签 steps: - - name: 检出代码 - uses: actions/checkout@v4 + # 不用 actions/checkout(它要去 github.com 下载 action,内网 runner 连不上会 EOF); + # 直接从内网 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 上) run: |