Updated workdir

This commit is contained in:
Sambo Chea 2021-07-14 17:15:43 +07:00
parent 4aa0c663aa
commit 34a09d857a

View File

@ -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`"
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`"