fix(gitea): Docker runner 使用 catthehacker/ubuntu:act-* 镜像替代 node:16-bullseye
- 解决 docker/login-action 等 actions 因缺少 docker CLI 而失败的问题 - catthehacker/ubuntu:act-* 镜像预装 Docker CLI、Buildx 等 CI/CD 工具 - 添加镜像选择的注释说明
This commit is contained in:
@@ -119,7 +119,9 @@ host:
|
|||||||
workdir_parent: /data/workspace
|
workdir_parent: /data/workspace
|
||||||
YAML
|
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 \
|
docker run -d \
|
||||||
--name "$name" \
|
--name "$name" \
|
||||||
@@ -627,7 +629,13 @@ create_runner() {
|
|||||||
else
|
else
|
||||||
# Docker mode uses standard labels mapping to images
|
# Docker mode uses standard labels mapping to images
|
||||||
# Format: label:docker://image
|
# 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
|
fi
|
||||||
|
|
||||||
echo "✓ Labels ($mode):"
|
echo "✓ Labels ($mode):"
|
||||||
@@ -888,7 +896,13 @@ if [ "$RUNNER_MODE" = "host" ]; then
|
|||||||
else
|
else
|
||||||
# Docker mode uses standard labels mapping to images
|
# Docker mode uses standard labels mapping to images
|
||||||
# Format: label:docker://image
|
# 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
|
fi
|
||||||
|
|
||||||
echo "✓ Labels ($RUNNER_MODE):"
|
echo "✓ Labels ($RUNNER_MODE):"
|
||||||
|
|||||||
Reference in New Issue
Block a user