From 23e2be876eb917ad164ddc37db6d66fe317d8e7d Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Thu, 28 Jan 2021 16:54:08 +0100 Subject: [PATCH] Use env variable for docker network id, instead of github action input --- action.yml | 6 ++---- entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 5c1fd4f..2dbebce 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/entrypoint.sh b/entrypoint.sh index ce72884..0dbb387 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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`"