Skip to content

Commit 240515a

Browse files
authored
Add more no suffix version tag for k8s (#431)
k8s image was built with architecture specific image to build in Dockerfile FROM, so add more tags for arm64 and amd64. Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent d42c361 commit 240515a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/docker-build.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,30 @@ jobs:
7272
esac
7373
branch=$(echo $target | cut -d'/' -f1)
7474
tags=$(echo $target | cut -d':' -f2-)
75-
tag1=$(echo $tags | cut -d',' -f1)
76-
tag2=$(echo $tags | cut -d',' -f2)
77-
tag3=$(echo $tags | cut -d',' -f3)
75+
push_tags=""
76+
for tag in $(echo "$tags" | tr , ' '); do
77+
if [ -z "$push_tags" ]; then
78+
push_tags="${{ env.REPOSITORY }}:$tag"
79+
else
80+
push_tags="$push_tags,${{ env.REPOSITORY }}:$tag"
81+
fi
82+
done
7883
case $component in
7984
*alpine*)
8085
echo "CONTEXT=${branch}/${component}" >> ${GITHUB_ENV}
81-
echo "ALPINETAGS=${{ env.REPOSITORY }}:${tag1},${{ env.REPOSITORY }}:${tag2},${{ env.REPOSITORY }}:${tag3}" >> ${GITHUB_ENV}
86+
echo "ALPINETAGS=$push_tags" >> ${GITHUB_ENV}
8287
;;
8388
*arm64*)
8489
echo "CONTEXT=${branch}/${component}/debian" >> ${GITHUB_ENV}
85-
echo "ARM64TAGS=${{ env.REPOSITORY }}:${tag1},${{ env.REPOSITORY }}:${tag2},${{ env.REPOSITORY }}:${tag3}" >> ${GITHUB_ENV}
90+
echo "ARM64TAGS=$push_tags" >> ${GITHUB_ENV}
8691
;;
8792
*armhf*)
8893
echo "CONTEXT=${branch}/${component}/debian" >> ${GITHUB_ENV}
89-
echo "ARMHFTAGS=${{ env.REPOSITORY }}:${tag1},${{ env.REPOSITORY }}:${tag2},${{ env.REPOSITORY }}:${tag3}" >> ${GITHUB_ENV}
94+
echo "ARMHFTAGS=$push_tags" >> ${GITHUB_ENV}
9095
;;
9196
*amd64*)
9297
echo "CONTEXT=${branch}/debian" >> ${GITHUB_ENV}
93-
echo "AMD64TAGS=${{ env.REPOSITORY }}:${tag1},${{ env.REPOSITORY }}:${tag2},${{ env.REPOSITORY }}:${tag3}" >> ${GITHUB_ENV}
98+
echo "AMD64TAGS=$push_tags" >> ${GITHUB_ENV}
9499
;;
95100
esac
96101
done

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
IMAGE_NAME := fluent/fluentd
1919
X86_IMAGES := \
2020
v1.18/alpine:v1.18.0-1.1,v1.18-1,edge \
21-
v1.18/debian:v1.18.0-debian-amd64-1.1,v1.18-debian-amd64-1,edge-debian-amd64
21+
v1.18/debian:v1.18.0-debian-amd64-1.1,v1.18-debian-amd64-1,v1.18.0-debian-amd64,edge-debian-amd64
2222
# <Dockerfile>:<version>,<tag1>,<tag2>,...
2323

2424
# Define images for running on ARM platforms
2525
ARM_IMAGES := \
26-
v1.18/armhf/debian:v1.18.0-debian-armhf-1.1,v1.18-debian-armhf-1,edge-debian-armhf \
26+
v1.18/armhf/debian:v1.18.0-debian-armhf-1.1,v1.18-debian-armhf-1,v1.18.0-debian-armhf,edge-debian-armhf \
2727

2828
# Define images for running on ARM64 platforms
2929
ARM64_IMAGES := \
30-
v1.18/arm64/debian:v1.18.0-debian-arm64-1.1,v1.18-debian-arm64-1,edge-debian-arm64 \
30+
v1.18/arm64/debian:v1.18.0-debian-arm64-1.1,v1.18-debian-arm64-1,v1.18.0-debian-arm64,edge-debian-arm64 \
3131

3232
WINDOWS_IMAGES := \
3333
v1.18/windows-ltsc2019:v1.18.0-windows-ltsc2019-1.1,v1.18-windows-ltsc2019-1 \

0 commit comments

Comments
 (0)