From 0c3fc6c912e7bdf8d730eb7ab888c4f4fe306254 Mon Sep 17 00:00:00 2001 From: xiamuceer Date: Sat, 24 Jan 2026 12:47:54 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=9B=B4=E6=96=B0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 84a79d8..d67c967 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -2,15 +2,8 @@ name: Build and Push Multi-Arch Docker Image on: push: - branches: - - main - - master tags: - 'v*' - pull_request: - branches: - - main - - master workflow_dispatch: # 允许手动触发 env: @@ -37,7 +30,6 @@ jobs: network=host - name: Login to Docker Hub - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -66,7 +58,7 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha @@ -75,7 +67,7 @@ jobs: BUILDKIT_INLINE_CACHE=1 - name: Update Docker Hub Description - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') + if: startsWith(github.ref, 'refs/tags/v') uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }}