alpine golang-1.25 镜像没装 Node, actions/checkout@v4 启动失败:
Run Checkout
OCI runtime exec failed: exec failed: unable to start container
process: exec: "node": executable file not found in \$PATH: unknown
actions/checkout 是 Node.js 应用, Gitea alpine runner 镜像不
带 Node. 改用 git clone 手写 checkout step:
git clone --depth 1 "\${{ github.server_url }}/\${{ github.repository }}.git" .
shallow clone (\$depth 1) 减少传输量, \${{ github.server_url }} 自动
填入 Gitea 实例 URL, \${{ github.repository }} 是 owner/repo 路径.
这个 runner 应该跟 Gitea 在同一网络, 仓库公开, 不需要 auth
token. 如果将来换 runner 跨网络或者仓库私有, 改成:
git clone --depth 1 \\
-c http.extraHeader="Authorization: token \$GITEA_TOKEN" \\
"\${{ github.server_url }}/\${{ github.repository }}.git" .
GITEA_TOKEN 走 \${{ secrets.GITHUB_TOKEN }} (Gitea 自动注入).
Co-Authored-By: Claude <noreply@anthropic.com>