Skip to content

Commit f215b6b

Browse files
committed
add postgres extra config argument
1 parent 4f5e163 commit f215b6b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ See [action.yml](action.yml)
1111
Basic:
1212
```yaml
1313
steps:
14-
- uses: harmon758/postgresql-action@v1
14+
- uses: danielweller-swp/postgresql-action@v1
1515
with:
1616
postgresql version: '11' # See https://hub.docker.com/_/postgres for available versions
17+
postgresql init scripts: 'init-db'
18+
postgresql conf: 'max_prepared_transactions=100'
1719
```
1820
1921
# License

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inputs:
2727
description: 'POSTGRES_INIT_SCRIPTS - directory containing DB init scripts'
2828
required: false
2929
default: ''
30+
postgresql conf:
31+
description: 'POSTGRES_CONF - postgres configurations'
32+
required: false
33+
default: ''
3034
runs:
3135
using: 'docker'
3236
image: 'Dockerfile'

entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ fi
1414

1515
docker_run="$docker_run -d -p 5432:5432 postgres:$INPUT_POSTGRESQL_VERSION"
1616

17+
if [ ! -z "$INPUT_POSTGRESQL_CONF" ]
18+
then
19+
docker_run="$docker_run -c '$INPUT_POSTGRESQL_CONF'"
20+
fi
21+
1722
sh -c "$docker_run"

0 commit comments

Comments
 (0)