Skip to content

Commit

Permalink
Merge pull request #3597 from crazy-max/fix-hack-images
Browse files Browse the repository at this point in the history
hack: do not set attest flags when exporting to docker
  • Loading branch information
crazy-max authored Feb 8, 2023
2 parents ecc5937 + 2c90a7b commit 0ccfe62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hack/images
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ if [[ "$TAG" == "local" ]]; then
fi
fi

attestFlags="$(buildAttestFlags)"

outputFlag="--output=type=image,push=false"
if [ "$PUSH" = "push" ]; then
outputFlag="--output=type=image,buildinfo-attrs=true,push=true"
fi
if [ -n "$localmode" ]; then
outputFlag="--output=type=docker,buildinfo-attrs=true"
attestFlags=""
fi

targetFlag=""
Expand Down Expand Up @@ -88,5 +91,5 @@ for tagName in $tagNames; do
tagFlags="$tagFlags--tag=$tagName "
done

buildxCmd build $platformFlag $targetFlag $importCacheFlags $exportCacheFlags $tagFlags $outputFlag $(buildAttestFlags) \
buildxCmd build $platformFlag $targetFlag $importCacheFlags $exportCacheFlags $tagFlags $outputFlag $attestFlags \
$currentcontext

0 comments on commit 0ccfe62

Please sign in to comment.