From 5f6402ec6225d33d3b103842e0af654a93d050b6 Mon Sep 17 00:00:00 2001 From: lesterli Date: Sat, 19 Oct 2024 19:47:18 +0800 Subject: [PATCH] fix: docker push --- .github/workflows/publish-bitcoin.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish-bitcoin.yml b/.github/workflows/publish-bitcoin.yml index 6415bf2..9a862b6 100644 --- a/.github/workflows/publish-bitcoin.yml +++ b/.github/workflows/publish-bitcoin.yml @@ -7,10 +7,11 @@ name: publish-bitcoin on: push: - paths: - - 'scripts/bitcoin/**' tags: - 'v*' + pull_request: + paths: + - 'scripts/bitcoin/**' env: # Use docker.io for Docker Hub if empty @@ -52,19 +53,6 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=ref,event=branch - type=semver,pattern=v{{version}} - type=sha - - name: Set Docker image tag id: set-tag run: | @@ -82,7 +70,7 @@ jobs: with: push: true context: scripts/bitcoin - tags: ${{ steps.set-tag.outputs.TAG }} - labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.set-tag.outputs.TAG }} cache-from: type=gha cache-to: type=gha,mode=max \ No newline at end of file