fix(workflows): 修正docker构建工作流配置格式
Some checks failed
Build and Push Docker / build (push) Failing after 0s

- 规范push分支配置格式,添加空格
- 修复Docker Buildx步骤的缩进问题
- 添加内联配置,支持私有仓库地址的http和不安全访问
- 调整docker守护进程重启逻辑,增加sleep等待
- 优化缓存步骤格式,确保缓存生效
This commit is contained in:
movingsam 2026-03-01 23:17:23 +08:00
parent f1238a9b2e
commit be39498010

View File

@ -1,7 +1,7 @@
name: Build and Push Docker name: Build and Push Docker
on: on:
push: push:
branches: [main] branches: [ main ]
tags: tags:
- "v*" - "v*"
env: env:
@ -22,12 +22,18 @@ jobs:
EOF EOF
pkill -HUP dockerd || true pkill -HUP dockerd || true
sleep 3 sleep 3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3
with: with:
driver: docker-container driver: docker-container
driver-opts: image=moby/buildkit:latest driver-opts: image=moby/buildkit:latest
buildkitd-flags: --allow-insecure-entitlement security.insecure buildkitd-flags: --allow-insecure-entitlement security.insecure
config-inline: |
[registry."192.168.100.120:8418"]
http = true
insecure = true
- name: Cache Docker layers - name: Cache Docker layers
uses: actions/cache@v4 uses: actions/cache@v4
with: with: