Skip to content

Commit 3f8cb23

Browse files
authored
Merge pull request #47 from ikalnytskyi/feat/postgres-17
Add PostgreSQL 17
2 parents 32cbb0b + cf41676 commit 3f8cb23

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
4949
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres
5050
EXPECTED_SERVICE_NAME: postgres
51-
EXPECTED_SERVER_VERSION: "16"
51+
EXPECTED_SERVER_VERSION: "17"
5252
EXPECTED_SSL: false
5353

5454
parametrized:
@@ -67,6 +67,7 @@ jobs:
6767
postgres-version:
6868
- "14"
6969
- "15"
70+
- "16"
7071
steps:
7172
- uses: actions/checkout@v4
7273

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ key features:
2424
| password | The password of the user to setup. | `postgres` |
2525
| database | The database name to setup and grant permissions to created user. | `postgres` |
2626
| port | The server port to listen on. | `5432` |
27-
| postgres-version | The PostgreSQL major version to install. Supported values: "14", "15", "16". | `16` |
27+
| postgres-version | The PostgreSQL major version to install. Supported values: "14", "15", "16", "17". | `17` |
2828

2929
#### Outputs
3030

action.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ inputs:
2222
default: "5432"
2323
required: false
2424
postgres-version:
25-
description: The PostgreSQL major version to install. Either "14", "15", or "16".
26-
default: "16"
25+
description: The PostgreSQL major version to install. Either "14", "15", "16" or "17".
26+
default: "17"
2727
ssl:
2828
description: When "true", encrypt connections using SSL (TLS).
2929
default: "false"
@@ -43,8 +43,8 @@ runs:
4343
steps:
4444
- name: Install PostgreSQL
4545
run: |
46-
if [[ ! "${{ inputs.postgres-version }}" =~ ^(14|15|16)$ ]]; then
47-
echo "::error::postgres-version must be one of: 14, 15, 16."
46+
if [[ ! "${{ inputs.postgres-version }}" =~ ^(14|15|16|17)$ ]]; then
47+
echo "::error::postgres-version must be one of: 14, 15, 16, 17."
4848
exit 1
4949
fi
5050
@@ -82,11 +82,15 @@ runs:
8282
echo "PQ_LIB_DIR=$PG_LIBDIR" >> $GITHUB_ENV
8383
8484
elif [ "$RUNNER_OS" == "macOS" ]; then
85+
# HOMEBREW_GITHUB_ACTIONS is used to skip 'initdb' execution to save
86+
# some seconds. That invocation is not needed because of initdb
87+
# invocation below.
88+
export HOMEBREW_GITHUB_ACTIONS=1
8589
export HOMEBREW_NO_ENV_HINTS=1
8690
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
8791
export HOMEBREW_NO_INSTALL_CLEANUP=1
8892
export HOMEBREW_NO_INSTALL_UPGRADE=1
89-
brew install --quiet --skip-post-install postgresql@${{ inputs.postgres-version }}
93+
brew install --quiet postgresql@${{ inputs.postgres-version }}
9094
9195
# Link PostgreSQL binaries from /usr/local/bin in order to make them
9296
# available globally. The --overwrite option is required since some

0 commit comments

Comments
 (0)