Use env variable for docker network id, instead of github action input

This commit is contained in:
Jonatan Heyman 2021-01-28 16:54:08 +01:00
parent faad629471
commit 23e2be876e
2 changed files with 3 additions and 5 deletions

View File

@ -24,10 +24,8 @@ inputs:
password: password:
description: 'Password' description: 'Password'
required: false required: false
docker_network:
description: 'Docker Network ID'
default: ${{ job.container.network }}
retuired: false
runs: runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'
env:
JOB_CONTAINER_NETWORK_ID: ${{ job.container.network }}

View File

@ -9,4 +9,4 @@ docker network ls
echo "$INPUT_RUN" | sed -e 's/\\n/;/g' > semicolon_delimited_script 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`"