Skip to content

Commit

Permalink
Merge pull request #143 from whoan/issue-142
Browse files Browse the repository at this point in the history
Honor push_image_and_stages input
  • Loading branch information
whoan authored Oct 23, 2023
2 parents 307cd04 + 40d2c68 commit 23a01a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ _build_image_buildkit() {
local cache_image
cache_image="$(_get_full_stages_image_name)":latest

local cache_to
if _must_push; then
cache_to="--cache-to mode=max,image-manifest=true,type=registry,ref=$cache_image"
fi

_parse_extra_args

set -x
Expand All @@ -393,7 +398,7 @@ _build_image_buildkit() {
docker buildx build \
--load \
--cache-from type=registry,ref="$cache_image" \
--cache-to mode=max,image-manifest=true,type=registry,ref="$cache_image" \
$cache_to \
--tag "$DUMMY_IMAGE_NAME" \
--file "${INPUT_CONTEXT}"/"${INPUT_DOCKERFILE}" \
${INPUT_BUILD_EXTRA_ARGS} \
Expand Down

0 comments on commit 23a01a4

Please sign in to comment.