From 417f3e6d2b5713fabf9df1b5dea6cc808267fb66 Mon Sep 17 00:00:00 2001 From: Voson Date: Sat, 24 Jan 2026 12:13:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(gitea):=20Docker=20runner=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20catthehacker/ubuntu:act-*=20=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20node:16-bullseye?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 解决 docker/login-action 等 actions 因缺少 docker CLI 而失败的问题 - catthehacker/ubuntu:act-* 镜像预装 Docker CLI、Buildx 等 CI/CD 工具 - 添加镜像选择的注释说明 --- skill/gitea/create-runner.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/skill/gitea/create-runner.md b/skill/gitea/create-runner.md index 2ce1d5e..fd81cde 100644 --- a/skill/gitea/create-runner.md +++ b/skill/gitea/create-runner.md @@ -119,7 +119,9 @@ host: workdir_parent: /data/workspace YAML - local labels="ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-buster,linux:docker://node:16-bullseye" + # 使用 catthehacker/ubuntu:act-* 镜像,内置 Docker CLI、Buildx 等 CI/CD 工具 + # 注意:不要使用 node:16-bullseye 等纯运行时镜像,它们不包含 docker 命令 + local labels="ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04,linux:docker://catthehacker/ubuntu:act-latest" docker run -d \ --name "$name" \ @@ -627,7 +629,13 @@ create_runner() { else # Docker mode uses standard labels mapping to images # Format: label:docker://image - labels="ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-buster,linux:docker://node:16-bullseye" + # 重要:必须使用包含 Docker CLI 的镜像,否则 docker/login-action 等 actions 会失败 + # catthehacker/ubuntu:act-* 是专为 GitHub/Gitea Actions 设计的镜像,预装: + # - Docker CLI (docker 命令) + # - Docker Buildx + # - git, curl, jq 等常用工具 + # 不要使用 node:16-bullseye 等纯运行时镜像! + labels="ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04,linux:docker://catthehacker/ubuntu:act-latest" fi echo "✓ Labels ($mode):" @@ -888,7 +896,13 @@ if [ "$RUNNER_MODE" = "host" ]; then else # Docker mode uses standard labels mapping to images # Format: label:docker://image - labels="ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-buster,linux:docker://node:16-bullseye" + # 重要:必须使用包含 Docker CLI 的镜像,否则 docker/login-action 等 actions 会失败 + # catthehacker/ubuntu:act-* 是专为 GitHub/Gitea Actions 设计的镜像,预装: + # - Docker CLI (docker 命令) + # - Docker Buildx + # - git, curl, jq 等常用工具 + # 不要使用 node:16-bullseye 等纯运行时镜像! + labels="ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04,linux:docker://catthehacker/ubuntu:act-latest" fi echo "✓ Labels ($RUNNER_MODE):"