ci: 移除DockerHub登录和镜像推送的条件限制

之前DockerHub登录和镜像推送仅在`main`分支上执行,现移除条件限制,使所有分支都能推送镜像。这有助于在开发分支上测试和验证镜像构建流程。
This commit is contained in:
wood chen 2025-03-20 18:30:51 +08:00
parent a66fdebefe
commit 0ce91829a5

View File

@ -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 }}