修复gitea文件
Some checks failed
Build docker and publish / prepare (20.15.1) (push) Successful in 2s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:zero-ppanel-api name:api]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:zero-ppanel-admin name:admin]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:zero-ppanel-node name:node]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:zero-ppanel-queue name:queue]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:zero-ppanel-scheduler name:scheduler]) (push) Failing after 1s
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
Some checks failed
Build docker and publish / prepare (20.15.1) (push) Successful in 2s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:zero-ppanel-api name:api]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:zero-ppanel-admin name:admin]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:zero-ppanel-node name:node]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:zero-ppanel-queue name:queue]) (push) Failing after 1s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:zero-ppanel-scheduler name:scheduler]) (push) Failing after 1s
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
This commit is contained in:
parent
8d1c16ba04
commit
2161df8cc7
@ -61,12 +61,14 @@ jobs:
|
||||
esac
|
||||
|
||||
# ============================================================
|
||||
# Job 2: 并行矩阵构建 5 个服务镜像
|
||||
# Job 2: 并行矩阵构建 5 个服务镜像 - 💥 重点修改这里 💥
|
||||
# ============================================================
|
||||
build:
|
||||
runs-on: zero-ppanel-server
|
||||
container:
|
||||
image: node:20.15.1 # 使用 Node.js 容器运行整个 build job
|
||||
container: # <-- 整个 build job 在 Node.js 容器中运行
|
||||
image: node:20.15.1
|
||||
volumes: # <-- 关键:挂载 Docker socket,允许容器内使用 Docker CLI
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -92,20 +94,38 @@ jobs:
|
||||
- name: 📥 下载代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 移除了 Set up Node.js environment 步骤,因为整个 job 已在 Node.js 容器中运行
|
||||
|
||||
- name: 🔧 确保 Docker CLI 可用并构建依赖
|
||||
- name: 🔧 确保 Docker CLI 可用并安装 Go 环境
|
||||
run: |
|
||||
set -e
|
||||
# 在 Node.js 容器中,通常 Docker client 已经可用或通过绑定宿主 Docker daemon
|
||||
# 因此不需要重复安装 docker-ce-cli
|
||||
# 仅保留基础命令或用于构建镜像的依赖
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -y -o Dpkg::Lock::Timeout=300
|
||||
apt-get install -y -o Dpkg::Lock::Timeout=300 ca-certificates curl gnupg
|
||||
apt-get update -y
|
||||
apt-get install -y ca-certificates curl gnupg
|
||||
|
||||
# !!! 在 node 容器中安装 docker-ce-cli !!!
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||
https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
|
||||
> /etc/apt/sources.list.d/docker.list
|
||||
apt-get update -y
|
||||
apt-get install -y docker-ce-cli # <<-- 确保 docker CLI 被安装
|
||||
|
||||
echo "Docker CLI 版本: $(docker --version)"
|
||||
echo "API 版本: $(docker version --format '{{.Client.APIVersion}}')"
|
||||
echo "Test Docker connectivity: $(docker info --format '{{.ServerVersion}}') (Server)"
|
||||
|
||||
# 同步 Go 环境设置, 因为整个 job 都在容器中运行了,Go 也要重新设置
|
||||
apt-get install -y git golang-go # 安装 Go
|
||||
go version
|
||||
go env -w GOPROXY=https://goproxy.cn,direct # 设置 Go Proxy
|
||||
go mod download
|
||||
|
||||
|
||||
- name: Run linter
|
||||
run: make lint
|
||||
|
||||
# 移除了原有的 "Set up Node.js environment" 步骤 (已在容器 image 中)
|
||||
# 移除了原有的 "Download Go modules dependencies" 步骤 (已合并到 Docker CLI 安装步骤)
|
||||
|
||||
- name: 📤 构建并推送 ${{ matrix.service.name }}
|
||||
run: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user