diff --git a/action.yml b/action.yml index 7c1a8e6..5835bcd 100644 --- a/action.yml +++ b/action.yml @@ -2,6 +2,9 @@ name: 'Docker Run Action' description: 'Run a command in a new container' inputs: + tarball: + description: 'Image tarball' + required: false image: description: 'Image' required: true diff --git a/entrypoint.sh b/entrypoint.sh index 39c1d70..184c292 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,4 +8,8 @@ if [ ! -z $INPUT_DOCKER_NETWORK ]; then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK" fi +if [ ! -z $INPUT_TARBALL ]; +then docker load --input $INPUT_TARBALL +fi + exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}"