name: Publish Docker Image ARM64 on: release: types: [published] workflow_dispatch: inputs: tag: description: 'Tag to build and publish' required: true default: 'latest' env: REGISTRY: docker.io IMAGE_NAME: cashubtc/mintd jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest-arm64,enable=${{ github.event_name == 'release' }} type=semver,pattern={{version}}-arm64 type=semver,pattern={{major}}.{{minor}}-arm64 type=ref,event=branch,suffix=-arm64 type=ref,event=pr,suffix=-arm64 type=sha,suffix=-arm64 ${{ github.event.inputs.tag != '' && format('{0}-arm64', github.event.inputs.tag) || '' }} # Build and push ARM64 image with architecture suffix - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true platforms: linux/arm64 file: ./Dockerfile.arm tags: ${{ steps.meta.outputs.tags }}-arm64 labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max