fix(ci): 配置docker-container buildx builder修复cache export失败 #320
Reference in New Issue
Block a user
Delete Branch "fix/ci-buildx-builder"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
新CI服务器上Docker使用默认
dockerdriver,不支持buildx的--cache-to导出功能,导致所有Staging/Production镜像构建直接失败:develop分支当前CI全红(3个Staging构建全挂)。
修复方案
在6个镜像构建Job(3个Staging + 3个Production)的Build步骤前,统一添加
Setup buildx builder步骤:ci-builder实例,没有则用docker buildx create --use --driver docker-container创建docker buildx use ci-builder切换docker buildx inspect --bootstrap确保builder启动就绪变更范围
.gitea/workflows/ci-cd.yml: 6个构建Job各加1个builder初始化步骤LGTM - 4个核心门禁全绿,builder修复方案正确