Fixed docker image and commands and add 0.9

This commit is contained in:
Sambo Chea 2021-03-26 21:42:12 +07:00
parent 37eff36a01
commit 4b3e16a467
3 changed files with 12 additions and 5 deletions

View File

@ -10,7 +10,7 @@ jobs:
steps:
- name: Starter Docker Test
uses: cubetiq/starter-docker-actions@v0.8
uses: cubetiq/starter-docker-actions@v0.9
with:
shell: bash
run: docker version

View File

@ -9,7 +9,7 @@
```yaml
- name: Starter Docker
uses: CUBETIQ/starter-docker-actions@v0.8
uses: CUBETIQ/starter-docker-actions@v0.9
```
# Example Action
@ -27,7 +27,7 @@ jobs:
steps:
- name: Starter Docker Test
uses: cubetiq/starter-docker-actions@v0.8
uses: cubetiq/starter-docker-actions@v0.9
with:
shell: bash
run: docker version

View File

@ -11,11 +11,18 @@ then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK"
fi
if [ -z $INPUT_SHELL ];
then INPUT_IMAGE=bash
then INPUT_SHELL=bash
fi
if [ -z $INPUT_IMAGE ];
then INPUT_IMAGE=docker
fi
echo "Shell: $INPUT_SHELL"
echo "Image: $INPUT_IMAGE"
if [ -z $semicolon_delimited_script ];
then semicolon_delimited_script="echo $(whoami)"
fi
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"