Skip to content

Commit

Permalink
Add PostgreSQL 17
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ikalnytskyi committed Oct 23, 2024
1 parent 7a757a6 commit 6dcf6b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres
EXPECTED_SERVICE_NAME: postgres
EXPECTED_SERVER_VERSION: "16"
EXPECTED_SERVER_VERSION: "17"
EXPECTED_SSL: false

parametrized:
Expand All @@ -67,6 +67,7 @@ jobs:
postgres-version:
- "14"
- "15"
- "16"
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ key features:
| password | The password of the user to setup. | `postgres` |
| database | The database name to setup and grant permissions to created user. | `postgres` |
| port | The server port to listen on. | `5432` |
| postgres-version | The PostgreSQL major version to install. Supported values: "14", "15", "16". | `16` |
| postgres-version | The PostgreSQL major version to install. Supported values: "14", "15", "16", "17". | `17` |

#### Outputs

Expand Down
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ inputs:
default: "5432"
required: false
postgres-version:
description: The PostgreSQL major version to install. Either "14", "15", or "16".
default: "16"
description: The PostgreSQL major version to install. Either "14", "15", "16" or "17".
default: "17"
ssl:
description: When "true", encrypt connections using SSL (TLS).
default: "false"
Expand All @@ -43,8 +43,8 @@ runs:
steps:
- name: Install PostgreSQL
run: |
if [[ ! "${{ inputs.postgres-version }}" =~ ^(14|15|16)$ ]]; then
echo "::error::postgres-version must be one of: 14, 15, 16."
if [[ ! "${{ inputs.postgres-version }}" =~ ^(14|15|16|17)$ ]]; then
echo "::error::postgres-version must be one of: 14, 15, 16, 17."
exit 1
fi
Expand Down Expand Up @@ -82,6 +82,11 @@ runs:
echo "PQ_LIB_DIR=$PG_LIBDIR" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "macOS" ]; then
if [[ "${{ inputs.postgres-version }}" == "17" && "$(sw_vers -productVersion)" =~ 12.* ]]; then
echo "::error::PostgreSQL 17 is not supported on macOS 12 (Monterey). Use PostgreSQL 16 or macOS 13 (Ventura)."
exit 1
fi
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALL_UPGRADE=1
Expand Down

0 comments on commit 6dcf6b6

Please sign in to comment.