Skip to content

Commit 277c32c

Browse files
committed
Add PostgreSQL 17
PostgreSQL 17 is the most recent version of the PostgreSQL database, released on September 26, 2024. It just makes sense to keep up with the upstream versions if we can, hence this patch.
1 parent 7a757a6 commit 277c32c

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- ubuntu-20.04
2222
- ubuntu-22.04
2323
- ubuntu-24.04
24-
- macos-12
2524
- macos-13
2625
- macos-14
2726
- windows-2019
@@ -48,7 +47,7 @@ jobs:
4847
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
4948
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres
5049
EXPECTED_SERVICE_NAME: postgres
51-
EXPECTED_SERVER_VERSION: "16"
50+
EXPECTED_SERVER_VERSION: "17"
5251
EXPECTED_SSL: false
5352

5453
parametrized:
@@ -67,6 +66,7 @@ jobs:
6766
postgres-version:
6867
- "14"
6968
- "15"
69+
- "16"
7070
steps:
7171
- uses: actions/checkout@v4
7272

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 & 4 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,6 +82,11 @@ runs:
8282
echo "PQ_LIB_DIR=$PG_LIBDIR" >> $GITHUB_ENV
8383
8484
elif [ "$RUNNER_OS" == "macOS" ]; then
85+
if [[ "${{ inputs.postgres-version }}" == "17" && "$(sw_vers -productVersion)" =~ 12.* ]]; then
86+
echo "::error::PostgreSQL 17 is not supported on macOS 12 (Monterey). Use PostgreSQL 16 or macOS 13 (Ventura)."
87+
exit 1
88+
fi
89+
8590
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
8691
export HOMEBREW_NO_INSTALL_CLEANUP=1
8792
export HOMEBREW_NO_INSTALL_UPGRADE=1

0 commit comments

Comments
 (0)