Mount the workspace and set as default workdir
This commit is contained in:
parent
3e77f186b7
commit
d28725e076
2 changed files with 5 additions and 1 deletions
|
@ -8,6 +8,10 @@ inputs:
|
|||
options:
|
||||
description: 'Options'
|
||||
required: false
|
||||
workidr:
|
||||
description: 'Workdir for the container'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
run:
|
||||
description: 'Run command in container'
|
||||
required: false
|
||||
|
|
|
@ -8,4 +8,4 @@ if [ ! -z $INPUT_DOCKER_NETWORK ];
|
|||
then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK"
|
||||
fi
|
||||
|
||||
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}"
|
||||
exec docker run --workdir $INPUT_WORKDIR -v "/var/run/docker.sock:/var/run/docker.sock" -v "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}"
|
||||
|
|
Reference in a new issue