修复gitea文件
Some checks failed
Build docker and publish / prepare (20.15.1) (push) Successful in 3s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:zero-ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:zero-ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:zero-ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:zero-ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:zero-ppanel-scheduler name:scheduler]) (push) Has been cancelled
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 3s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:zero-ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:zero-ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:zero-ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:zero-ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:zero-ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
This commit is contained in:
parent
329a7815b8
commit
72c11fc762
@ -92,7 +92,13 @@ jobs:
|
|||||||
- name: 📥 下载代码
|
- name: 📥 下载代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 🔧 确保 Docker CLI 可用并安装 Go 环境
|
- name: Set up Go environment # 在 build job 中也设置 Go 环境
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.24.0' # 确保使用 go.mod 中指定的精确版本
|
||||||
|
# cache: true # 可以启用缓存加速依赖下载
|
||||||
|
|
||||||
|
- name: 🔧 确保 Docker CLI 可用并初始化 Go Modules
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
@ -112,42 +118,12 @@ jobs:
|
|||||||
echo "Docker CLI 版本: $(docker --version)"
|
echo "Docker CLI 版本: $(docker --version)"
|
||||||
echo "Test Docker connectivity: $(docker info --format '{{.ServerVersion}}') (Server)"
|
echo "Test Docker connectivity: $(docker info --format '{{.ServerVersion}}') (Server)"
|
||||||
|
|
||||||
# 同步 Go 环境设置, 因为整个 job 都在容器中运行了,Go 也要重新设置
|
# 移除手动 Go 安装,已由 actions/setup-go 处理
|
||||||
apt-get install -y git golang-go # 安装 Go
|
# go version # 已经通过 actions/setup-go 设置
|
||||||
go version
|
|
||||||
go env -w GOPROXY=https://goproxy.cn,direct # 设置 Go Proxy
|
go env -w GOPROXY=https://goproxy.cn,direct # 设置 Go Proxy
|
||||||
go mod download
|
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: |
|
|
||||||
DOCKER_TAG="${{ needs.prepare.outputs.docker_tag }}"
|
|
||||||
IMAGE_BASE="${{ env.REPO }}/${{ matrix.service.image_name }}"
|
|
||||||
|
|
||||||
echo "构建服务: ${{ matrix.service.name }}"
|
|
||||||
echo "镜像: ${IMAGE_BASE}"
|
|
||||||
echo "标签: ${DOCKER_TAG} | ${{ env.VERSION }}"
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
-f ${{ matrix.service.dockerfile }} \
|
|
||||||
--platform linux/amd64 \
|
|
||||||
--build-arg VERSION=${{ env.VERSION }} \
|
|
||||||
--build-arg BUILDTIME=${{ env.BUILDTIME }} \
|
|
||||||
-t ${IMAGE_BASE}:${{ env.VERSION }} \
|
|
||||||
-t ${IMAGE_BASE}:${DOCKER_TAG} \
|
|
||||||
.
|
|
||||||
|
|
||||||
docker push ${IMAGE_BASE}:${{ env.VERSION }}
|
|
||||||
docker push ${IMAGE_BASE}:${DOCKER_TAG}
|
|
||||||
|
|
||||||
echo "✅ ${{ matrix.service.name }} 镜像推送完成"
|
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Job 3: 部署到服务器
|
# Job 3: 部署到服务器
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user