Skip to content

Commit

Permalink
Use env variable for docker network id, instead of github action input
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Jan 28, 2021
1 parent faad629 commit 23e2be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ inputs:
password:
description: 'Password'
required: false
docker_network:
description: 'Docker Network ID'
default: ${{ job.container.network }}
retuired: false
runs:
using: 'docker'
image: 'Dockerfile'
env:
JOB_CONTAINER_NETWORK_ID: ${{ job.container.network }}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ docker network ls

echo "$INPUT_RUN" | sed -e 's/\\n/;/g' > semicolon_delimited_script

exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" --network=$INPUT_DOCKER_NETWORK $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" --network=$JOB_CONTAINER_NETWORK_ID $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"

0 comments on commit 23e2be8

Please sign in to comment.