This commit is contained in:
gxl 2026-06-03 17:24:38 +08:00
parent c9ceb628c1
commit d79151cdde
1 changed files with 12 additions and 6 deletions

View File

@ -22,20 +22,26 @@ steps:
branch: master branch: master
- name: 镜像构建与推送 - name: 镜像构建与推送
image: woodpeckerci/plugin-docker-buildx:latest # 👇 1. 核心:必须换成官方文档指定的 -insecure 后缀镜像
image: woodpeckerci/plugin-docker-buildx:latest-insecure
privileged: true privileged: true
# ❌ 删除了这里的 environment 块,避免与 settings 冲突
settings: settings:
# 直接使用 YAML 锚点组合成完整的 repo 地址
repo: push.lovestory.cyou/abhors/demo repo: push.lovestory.cyou/abhors/demo
# 💡 文档高级配置:通知内部 dockerd 引擎全面放开对不安全 HTTP 仓库的拦截 insecure: true # 这个是给内部 dockerd 用的
insecure: true
registry: *APP_REGISTRY registry: *APP_REGISTRY
username: username:
from_secret: nexus_docker_username from_secret: nexus_docker_username
password: password:
from_secret: nexus_docker_password from_secret: nexus_docker_password
mirror: http://registry.lovestory.cyou
# 👇 2. 核心:完全对齐官方不安全设置文档,强制 BuildKit 放行纯 HTTP
buildkit_config: |
[registry."registry.lovestory.cyou"]
http = true
insecure = true
[registry."push.lovestory.cyou"]
http = true
insecure = true
when: when:
event: push event: push
branch: master branch: master