Skip to content

Commit aa2823e

Browse files
committed
Avoid platform-specific image tags by using digests in Docker manifest
Replaces per-architecture tags (e.g., *-amd64, *-arm64) with direct digest references when creating the multi-arch Docker manifest. This reduces tag clutter in the registry.
1 parent c9d6717 commit aa2823e

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/BuildDockerDeeploy.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
name: Build Deploy Image
3737
needs: [ prepare ]
3838
runs-on: ${{ matrix.runner }}
39+
outputs:
40+
digest-amd64: ${{ steps.digest.outputs.digest-amd64 }}
41+
digest-arm64: ${{ steps.digest.outputs.digest-arm64 }}
3942
strategy:
4043
fail-fast: false
4144
matrix:
@@ -100,9 +103,11 @@ jobs:
100103
push: true
101104
build-args: |
102105
BASE_IMAGE=${{ github.event.inputs.docker_image_toolchain }}
103-
tags: |
104-
ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-${{ matrix.platform }}
105-
ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}
106+
outputs: type=image,name=ghcr.io/${{ env.OWNER_LC }}/deeploy,annotation-index=true,name-canonical=true,push=true
107+
108+
- name: Extract image digest
109+
id: digest
110+
run: echo "digest-${{ matrix.platform }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT
106111

107112
merge-deeploy-images:
108113
name: Merge Deeploy Images
@@ -122,8 +127,13 @@ jobs:
122127
env:
123128
OWNER: '${{ github.repository_owner }}'
124129

125-
- uses: Noelware/docker-manifest-action@v1
130+
- name: Merge Deeploy Images
131+
uses: Noelware/docker-manifest-action@v1
126132
with:
127-
inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-arm64
128-
tags: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}
133+
inputs: |
134+
ghcr.io/${{ env.OWNER_LC }}/deeploy@${{ needs.build-deeploy.outputs.digest-amd64 }},
135+
ghcr.io/${{ env.OWNER_LC }}/deeploy@${{ needs.build-deeploy.outputs.digest-arm64 }}
136+
tags: |
137+
ghcr.io/${{ env.OWNER_LC }}/deeploy:latest,
138+
ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}
129139
push: true

0 commit comments

Comments
 (0)