Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
isaric committed Dec 24, 2023
1 parent 3458f18 commit c8e774e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME_ARM64: ${{ github.repository }}:${{ github.ref_name }}-arm64

IMAGE_NAME_AMD64: ${{ github.repository }}:${{ github.ref_name }}-amd64


jobs:
Expand Down Expand Up @@ -62,10 +64,16 @@ jobs:
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
id: meta-arm64
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_ARM64 }}

- name: Extract Docker metadata
id: meta-amd64
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_AMD64 }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand All @@ -76,8 +84,8 @@ jobs:
context: .
file: dockerfile-arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-arm64.outputs.tags }}
labels: ${{ steps.meta-arm64.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64
Expand All @@ -89,8 +97,8 @@ jobs:
context: .
file: dockerfile-amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-amd64.outputs.tags }}
labels: ${{ steps.meta-amd64.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
Expand Down

0 comments on commit c8e774e

Please sign in to comment.