From 29d56e951b3e284373669f51d3f45ab0bc72c818 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 64bdd5b..0e0718e 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,10 @@ inputs: description: 'POSTGRES_CONF - postgres configurations' 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 14cc2e4..984c9ef 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,7 +12,7 @@ then docker_run="$docker_run -v $INIT_SCRIPT_PATH:/docker-entrypoint-initdb.d" fi -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" if [ ! -z "$INPUT_POSTGRESQL_CONF" ] then