Skip to content

Commit

Permalink
fix tag option
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Sato <[email protected]>
  • Loading branch information
daisukes committed Jun 17, 2024
1 parent 8c49758 commit 79641eb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bake-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ if [[ -z $(docker buildx ls | grep "mybuilder\*") ]]; then
fi

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

# platform option
platform_option=
if [[ -n $platform ]]; then
platform_option="--set *.platform=\"$platform\""
platform_option="--set=*.platform=\"$platform\""
fi

# bake
Expand Down

0 comments on commit 79641eb

Please sign in to comment.