From 0ce91829a52e8265097bb1a265b3697e5ac241b4 Mon Sep 17 00:00:00 2001 From: wood chen Date: Thu, 20 Mar 2025 18:30:51 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E7=A7=BB=E9=99=A4DockerHub=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=92=8C=E9=95=9C=E5=83=8F=E6=8E=A8=E9=80=81=E7=9A=84?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前DockerHub登录和镜像推送仅在`main`分支上执行,现移除条件限制,使所有分支都能推送镜像。这有助于在开发分支上测试和验证镜像构建流程。 --- .github/workflows/build-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 521f60d..43aedcb 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -57,7 +57,6 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -67,7 +66,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: github.ref == 'refs/heads/main' + push: true platforms: ${{ env.PLATFORMS }} tags: ${{ steps.prep.outputs.tags }} cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }}