Updated entrypoint
This commit is contained in:
parent
185a8b5025
commit
708f352a8f
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Starter Docker Test
|
||||
uses: cubetiq/starter-docker-actions@v0.4
|
||||
uses: cubetiq/starter-docker-actions@v0.5
|
||||
with:
|
||||
shell: bash
|
||||
run: docker version
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
```yaml
|
||||
- name: Starter Docker
|
||||
uses: CUBETIQ/starter-docker-actions@v0.4
|
||||
uses: CUBETIQ/starter-docker-actions@v0.5
|
||||
```
|
||||
|
||||
# Example Action
|
||||
@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: cubetiq/starter-docker-actions@v0.4
|
||||
- uses: cubetiq/starter-docker-actions@v0.5
|
||||
- name: Starter Docker Test
|
||||
run: |
|
||||
docker images
|
||||
|
@ -6,10 +6,16 @@ fi
|
||||
|
||||
echo "$INPUT_RUN" | sed -e 's/\\n/;/g' > semicolon_delimited_script
|
||||
|
||||
echo "INPUT RUN => $semicolon_delimited_script"
|
||||
|
||||
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 "`cat semicolon_delimited_script`"
|
||||
if [ -z $INPUT_SHELL ];
|
||||
then INPUT_IMAGE=bash
|
||||
fi
|
||||
|
||||
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 $INPUT_IMAGE $INPUT_SHELL -c "`cat semicolon_delimited_script`"
|
Loading…
Reference in New Issue
Block a user