From fa90181bb41645cf810e3a318f14bcfe6ae5f4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=B8=B8?= Date: Mon, 3 Mar 2025 01:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Multi-platform=20image=20wi?= =?UTF-8?q?th=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 650156d7..5f40787f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,16 +40,20 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: 设置Docker Buildx uses: docker/setup-buildx-action@v3 - name: 构建并推送Docker镜像 - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max