Skip to content

Commit

Permalink
Merge pull request #903 from nextcloud/fix/tool/loading-cached-docker…
Browse files Browse the repository at this point in the history
…-images

fix(tool): Fix loading cached docker images
  • Loading branch information
provokateurin authored Oct 2, 2023
2 parents 90b0434 + b00c0c4 commit 9949724
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tool/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[*]}"
Expand Down

0 comments on commit 9949724

Please sign in to comment.