Browse Source

fix(tool): Fix loading cached docker images

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/903/head
jld3103 1 year ago
parent
commit
b00c0c441a
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 13
      tool/common.sh

13
tool/common.sh

@ -8,14 +8,13 @@ function image_tag() {
function cache_build_args() {
tag="$1"
build_args=("--cache-from" "type=registry,ref=$tag")
build_args=(
"--load"
"--cache-from" "type=registry,ref=$tag"
)
if [ -v GITHUB_REPOSITORY ]; then
build_args+=(
"--push"
"--cache-to" "type=registry,ref=$tag,mode=max"
)
else
build_args+=("--load")
build_args+=("--cache-to" "type=registry,ref=$tag,mode=max")
fi
echo "${build_args[*]}"

Loading…
Cancel
Save