From b00c0c441aa8813a837bb7285f9b10d32ede249c Mon Sep 17 00:00:00 2001 From: jld3103 Date: Mon, 2 Oct 2023 09:59:15 +0200 Subject: [PATCH] fix(tool): Fix loading cached docker images Signed-off-by: jld3103 --- tool/common.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tool/common.sh b/tool/common.sh index fde88841..d8e9af00 100644 --- a/tool/common.sh +++ b/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[*]}"