mirror of
https://code.thetadev.de/actions/kaniko.git
synced 2026-04-28 18:51:43 +00:00
feat: add dockerfile build arguments
This commit is contained in:
@@ -96,7 +96,16 @@ if [ -n "$INPUT_PLATFORMS" ]; then
|
||||
DESTINATION="--no-push --tarPath /kaniko/build/${platformFn}.tar --destination $IMAGE"
|
||||
DIGEST="--image-name-tag-with-digest-file=/kaniko/build/${platformFn}_image-tag-digest"
|
||||
|
||||
runKaniko "${ARGS} --custom-platform=${platform} $DESTINATION $DIGEST"
|
||||
targetos=$(echo "$platform" | cut -d/ -f1)
|
||||
targetarch=$(echo "$platform" | cut -d/ -f2)
|
||||
targetvariant=$(echo "$platform" | cut -d/ -f3)
|
||||
|
||||
case "$targetarch" in
|
||||
'amd64') targetarchAlt="x86_64" ;;
|
||||
*) targetarchAlt="$targetarch" ;;
|
||||
esac
|
||||
|
||||
runKaniko "${ARGS} --custom-platform=${platform} --build-arg TARGETPLATFORM='${platform}' --build-arg TARGETOS='${targetos}' --build-arg TARGETARCH='${targetarch}' --build-arg TARGETARCH_ALT='${targetarchAlt}' --build-arg TARGETVARIANT='${targetvariant}' $DESTINATION $DIGEST"
|
||||
|
||||
echo "✅ $platform image built: $(head -n 1 "/kaniko/build/${platformFn}_image-tag-digest")"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user