Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
image: private-image:latest
options: -v ${{ github.workspace }}:/work -e ABC=123
options: -e ABC=123
run: |
echo "Running Script"
/work/run-script
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
options:
description: 'Options'
required: false
workdir:
description: 'Workdir for the container'
required: false
default: /github/workspace/${{ github.event.repository.name }}
run:
description: 'Run command in container'
required: false
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$RUNNER_WORKSPACE:/github/workspace" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}"