Skip to content

Commit 10a94c2

Browse files
authored
Backport(v1.16): Introduce multiarch short alias tag (#428)
Backport #427 Before: * No version specific tag which is no need to follow internal version up. e.g. from v1.16.7-debian-1.0 to v1.16.7-debian-1.1, need to bump explicitly After: Introduce short alias tag which is no need to follow internal version up. * v1.16-debian * v1.16.7-debian Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent 55de0a2 commit 10a94c2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ jobs:
195195
${{ env.REPOSITORY }}:${AMD64TAG} \
196196
${{ env.REPOSITORY }}:${ARM64TAG} \
197197
${{ env.REPOSITORY }}:${ARMHFTAG}
198+
# v1.xx.y-debian (short alias without -1.x suffix)
199+
MULTIARCH_SHORT_ALIAS=$(echo ${MULTIARCH_AMD64_TAG} | cut -d'-' -f1,2)
200+
docker buildx imagetools create -t ${{ env.REPOSITORY }}:${MULTIARCH_SHORT_ALIAS} \
201+
${{ env.REPOSITORY }}:${AMD64TAG} \
202+
${{ env.REPOSITORY }}:${ARM64TAG} \
203+
${{ env.REPOSITORY }}:${ARMHFTAG}
198204
fi
199205
# v1.xx-debian-n.m
200206
if [ ${MULTIARCH_AMD64_SHORT_TAG} != ${MULTIARCH_ARM64_SHORT_TAG} -o ${MULTIARCH_AMD64_SHORT_TAG} != ${MULTIARCH_ARMHF_SHORT_TAG} -o ${MULTIARCH_ARM64_SHORT_TAG} != ${MULTIARCH_ARMHF_SHORT_TAG} ]; then
@@ -204,6 +210,12 @@ jobs:
204210
${{ env.REPOSITORY }}:${SHORT_AMD64TAG} \
205211
${{ env.REPOSITORY }}:${SHORT_ARM64TAG} \
206212
${{ env.REPOSITORY }}:${SHORT_ARMHFTAG}
213+
# v1.xx-debian (short alias without -1 suffix)
214+
MULTIARCH_SHORT_ALIAS=$(echo ${MULTIARCH_AMD64_SHORT_TAG} | cut -d'-' -f1,2)
215+
docker buildx imagetools create -t ${{ env.REPOSITORY }}:${MULTIARCH_SHORT_ALIAS} \
216+
${{ env.REPOSITORY }}:${SHORT_AMD64TAG} \
217+
${{ env.REPOSITORY }}:${SHORT_ARM64TAG} \
218+
${{ env.REPOSITORY }}:${SHORT_ARMHFTAG}
207219
fi
208220
# edge-debian
209221
docker buildx imagetools create -t ${{ env.REPOSITORY }}:edge-debian \

0 commit comments

Comments
 (0)