Skip to content

Commit

Permalink
fix: docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
lesterli committed Oct 19, 2024
1 parent 9b642a6 commit 5f6402e
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/publish-bitcoin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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

0 comments on commit 5f6402e

Please sign in to comment.