diff --git a/entrypoint.sh b/entrypoint.sh index cf08644..89965b2 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,7 @@ #!/bin/bash + +#### Current working directory is: /github/workspace #### +WORKDIR=$(pwd) if [ ! -z $INPUT_USERNAME ]; then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin @@ -22,8 +25,4 @@ if [ -z $semicolon_delimited_script ]; then semicolon_delimited_script="echo $(whoami)" fi -echo "Current directory..." -pwd -ls - -exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`" \ No newline at end of file +exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --workdir=$WORKDIR -v $WORKDIR:"/github/workspace" --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`" \ No newline at end of file