Skip to content

Commit 828df03

Browse files
daisukestatsuya-ishihara
authored andcommitted
fix tag option
Signed-off-by: Daisuke Sato <[email protected]>
1 parent 6c49698 commit 828df03

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

bake-docker.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,12 @@ if [[ -z $(docker buildx ls | grep "mybuilder\*") ]]; then
114114
fi
115115

116116
# tag option
117-
tag_option=""
118-
IFS=',' read -r -a tag_array <<< "$tags"
119-
tag_option="--set driver.tags='["
120-
for tag in "${tag_array[@]}"; do
121-
tag_option+="\"${REGISTRY}/${image_name}:${tag}\","
122-
done
123-
tag_option="${tag_option%,}]'"
117+
tag_option="--set=*.tags=${REGISTRY}/${image_name}:{${tags}}"
124118

125119
# platform option
126120
platform_option=
127121
if [[ -n $platform ]]; then
128-
platform_option="--set *.platform=\"$platform\""
122+
platform_option="--set=*.platform=\"$platform\""
129123
fi
130124

131125
# bake

0 commit comments

Comments
 (0)