Added an export tar option
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM public.ecr.aws/docker/library/alpine:3.20
|
FROM public.ecr.aws/docker/library/alpine:3.21
|
||||||
|
|
||||||
RUN apk add --no-cache docker-cli-buildx bash
|
RUN apk add --no-cache docker-cli-buildx bash
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ inputs:
|
|||||||
description: Comma separated list for building platform
|
description: Comma separated list for building platform
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
exportTar:
|
||||||
|
description: Whether to export the file as a tar image
|
||||||
|
required: false
|
||||||
|
|
||||||
# Define your outputs here.
|
# Define your outputs here.
|
||||||
outputs:
|
outputs:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ INPUT_PUSH_IMAGE=$push
|
|||||||
INPUT_PULL_CACHE=$pullCache
|
INPUT_PULL_CACHE=$pullCache
|
||||||
INPUT_DOCKERFILE_PATH=$path
|
INPUT_DOCKERFILE_PATH=$path
|
||||||
INPUT_PLATFORM=$platform
|
INPUT_PLATFORM=$platform
|
||||||
|
INPUT_EXPORT_TAR=$exportTar
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -43,6 +44,10 @@ if [ "$INPUT_PULL_CACHE" = "true" ]; then
|
|||||||
echo "Using docker image cache ${IMAGE_CACHE_NAME}"
|
echo "Using docker image cache ${IMAGE_CACHE_NAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$INPUT_EXPORT_TAR" ]; then
|
||||||
|
DOCKER_BUILD_OPTIONS+=("--output" "type=docker,dest=$INPUT_EXPORT_TAR")
|
||||||
|
fi
|
||||||
|
|
||||||
DOCKER_BUILD_OPTIONS+=("${INPUT_DOCKERFILE_PATH}")
|
DOCKER_BUILD_OPTIONS+=("${INPUT_DOCKERFILE_PATH}")
|
||||||
# shellcheck disable=SC2145
|
# shellcheck disable=SC2145
|
||||||
echo "Running docker buildx with options: ${DOCKER_BUILD_OPTIONS[@]}"
|
echo "Running docker buildx with options: ${DOCKER_BUILD_OPTIONS[@]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user