diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a7a09f7..9057286 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -18,6 +18,10 @@ env: REGISTRY: ghcr.io # github.repository as / IMAGE_NAME: ${{ github.repository }} + + TAG_ARM64: path-variable/python-slack-fr:${{ github.ref_name }}-arm64 + + TAG_AMD64: path-variable/python-slack-fr:${{ github.ref_name }}-amd64 jobs: @@ -62,10 +66,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 @@ -76,8 +86,8 @@ jobs: context: . file: dockerfile-arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ env.REGISTRY }}/${{ env.TAG_ARM64 }} + labels: ${{ steps.meta-arm64.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max platforms: linux/arm64 @@ -89,8 +99,8 @@ jobs: context: . file: dockerfile-amd64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ env.REGISTRY }}/${{ env.TAG_AMD64 }} + labels: ${{ steps.meta-amd64.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max platforms: linux/amd64