From 34a09d857a89a0e31e687eaa5e19312cd0d01839 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Wed, 14 Jul 2021 17:15:43 +0700 Subject: [PATCH] Updated workdir --- entrypoint.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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