From 5ff6bcfe514abe7813fc1098000ef0d095b5cde4 Mon Sep 17 00:00:00 2001 From: naeeo Date: Wed, 30 Sep 2026 00:20:30 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20act=5Frunner=20?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=9C=B0=E5=9D=80=E5=BF=85=E9=A1=BB=E4=B8=BA?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=AE=B9=E5=99=A8=E5=8F=AF=E8=BE=BE=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用 compose 内部服务名(如 http://gitea:3000)注册会导致 host 网络作业容器无法解析,artifact 上传报 ENOTFOUND。 --- setup.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.md b/setup.md index 6e03c79..65d0cee 100644 --- a/setup.md +++ b/setup.md @@ -147,6 +147,14 @@ docker run -d --name gitea-runner --restart always \ 工作流把 vcpkg 二进制缓存放在容器内 `/opt/vcpkg-cache`,如需跨任务复用,可在 job 容器配置中把该路径挂为持久卷。 +> **坑:注册地址必须是作业容器也能访问的地址。** 若 Gitea 与 act_runner 用 +> docker-compose 部署,千万不要用 `http://gitea:3000` 这类 compose 内部服务名 +> 注册(act_runner 容器自身可达,但 act_runner v3+ 的作业容器默认 host 网络, +> 解析不了该名)。否则上传/下载 artifact 时报 +> `Failed to CreateArtifact: ... ENOTFOUND`。`GITEA_INSTANCE_URL` 用公网地址 +> (如 `https://gitea.example.com`)或宿主机映射地址(如 `http://10.0.0.10:39630`), +> 改完编辑 `/data/config.yaml` 的 `runner.address` 重启即可,无需重新注册。 + **Windows(host 模式)**:在准备好构建环境的 Windows 机器上 (Git、PowerShell、Visual Studio 2022、vcpkg 位于 `C:\vcpkg`,并预创建 `D:\vcpkg-cache`;ImageMagick 等由工作流自动安装):