Skip to content

Commit cc4537c

Browse files
committed
Added port configuration
1 parent 0be19fa commit cc4537c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ inputs:
2323
description: 'POSTGRES_PASSWORD - superuser password'
2424
required: false
2525
default: ''
26+
postgresql port:
27+
description: 'The port to bind to the docker'
28+
required: false
29+
default: '5432'
2630
runs:
2731
using: 'docker'
2832
image: 'Dockerfile'

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ docker_run="docker run"
44
docker_run="$docker_run -e POSTGRES_DB=$INPUT_POSTGRESQL_DB"
55
docker_run="$docker_run -e POSTGRES_USER=$INPUT_POSTGRESQL_USER"
66
docker_run="$docker_run -e POSTGRES_PASSWORD=$INPUT_POSTGRESQL_PASSWORD"
7-
docker_run="$docker_run -d -p 5432:5432 postgres:$INPUT_POSTGRESQL_VERSION"
7+
docker_run="$docker_run -d -p $INPUT_POSTGRESQL_PORT:5432 postgres:$INPUT_POSTGRESQL_VERSION"
88

99
sh -c "$docker_run"

0 commit comments

Comments
 (0)