From cc4537c82896a43f363cdfd0c5fc08b3f76511ad Mon Sep 17 00:00:00 2001 From: ttgc Date: Fri, 13 Sep 2019 01:14:43 -0400 Subject: [PATCH] Added port configuration --- action.yml | 4 ++++ entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 15974ed..1cdc47a 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,10 @@ inputs: description: 'POSTGRES_PASSWORD - superuser password' required: false default: '' + postgresql port: + description: 'The port to bind to the docker' + required: false + default: '5432' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 8a2b489..080dc18 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,6 +4,6 @@ docker_run="docker run" docker_run="$docker_run -e POSTGRES_DB=$INPUT_POSTGRESQL_DB" docker_run="$docker_run -e POSTGRES_USER=$INPUT_POSTGRESQL_USER" docker_run="$docker_run -e POSTGRES_PASSWORD=$INPUT_POSTGRESQL_PASSWORD" -docker_run="$docker_run -d -p 5432:5432 postgres:$INPUT_POSTGRESQL_VERSION" +docker_run="$docker_run -d -p $INPUT_POSTGRESQL_PORT:5432 postgres:$INPUT_POSTGRESQL_VERSION" sh -c "$docker_run"