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