Skip to content

Commit af6e79a

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 4029b27 commit af6e79a

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/BuildDockerDeeploy.yml

Lines changed: 15 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-amd64.outputs.digest }}
41+
digest-arm64: ${{ steps.digest-arm64.outputs.digest }}
3942
strategy:
4043
fail-fast: false
4144
matrix:
@@ -98,9 +101,10 @@ jobs:
98101
push: true
99102
build-args: |
100103
BASE_IMAGE=${{ github.event.inputs.docker_image_toolchain }}
101-
tags: |
102-
ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-${{ matrix.platform }}
103-
ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}
104+
105+
- name: Extract image digest
106+
id: digest-${{ matrix.platform }}
107+
run: echo "digest=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT
104108

105109
merge-deeploy-images:
106110
name: Merge Deeploy Images
@@ -120,8 +124,13 @@ jobs:
120124
env:
121125
OWNER: '${{ github.repository_owner }}'
122126

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

0 commit comments

Comments
 (0)