mirror of
https://github.com/addnab/docker-run-action.git
synced 2024-12-27 03:15:59 +08:00
Use env variable for docker network id, instead of github action input
This commit is contained in:
parent
faad629471
commit
23e2be876e
@ -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 }}
|
||||
|
@ -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`"
|
||||
|
Loading…
x
Reference in New Issue
Block a user