Skip to content

Commit fb16716

Browse files
authored
Introduce multiarch short alias tag (#427)
Before: * No version specific tag which is no need to follow internal version up. e.g. from v1.18-debian-1.0 to v1.18-debian-1.1, pulling v1.18-debian is enough. After: Introduce short alias tag which is no need to follow internal version up. * v1.18-debian * v1.18.0-debian Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent e2e5604 commit fb16716

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)