检测buildx问题
Some checks failed
Build and Push Docker Images / build-and-push (backend) (push) Failing after 2m17s
Build and Push Docker Images / build-and-push (frontend) (push) Failing after 1m14s

This commit is contained in:
小贺
2025-09-04 10:27:15 +08:00
parent 3d6bacbe90
commit 106c6e0c34

View File

@@ -19,7 +19,17 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 # 获取完整的提交历史用于标签生成 fetch-depth: 0 # 获取完整的提交历史用于标签生成
-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry - name: Login to Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -62,18 +72,18 @@ jobs:
# 构建和推送后端镜像 # 构建和推送后端镜像
- name: Build and push backend image - name: Build and push backend image
if: matrix.service == 'backend' if: matrix.service == 'backend'
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: ./backend context: ./backend
file: ./backend/dockerfile file: ./backend/dockerfile
push: true push: true
tags: ${{ steps.meta-backend.outputs.tags }} tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }} labels: ${{ steps.meta-backend.outputs.labels }}
# 构建和推送前端镜像 # 构建和推送前端镜像
- name: Build and push frontend image - name: Build and push frontend image
if: matrix.service == 'frontend' if: matrix.service == 'frontend'
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: ./front context: ./front
file: ./front/dockerfile file: ./front/dockerfile