Skip to content

Commit

Permalink
support postgresql v11-16 (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Tonye Jack <[email protected]>
  • Loading branch information
BrennanColberg and jackton1 authored Nov 29, 2023
1 parent 09c24ee commit 85c3755
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
postgresql_version: [11, 12, 14, 15]
postgresql_version: [11, 12, 14, 15, 16]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies
- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@v2
with:
postgresql-version: 15
postgresql-version: 16
```
> NOTE: This updates the installed PostgreSQL version with the specified version and updates the PATH.
Expand All @@ -31,7 +31,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|----------------------------------------------------------------------------------------|--------|----------|---------|-------------------------------|
| <a name="input_postgresql-version"></a>[postgresql-version](#input_postgresql-version) | string | true | | Version of PostgreSQL. e.g 15 |
| <a name="input_postgresql-version"></a>[postgresql-version](#input_postgresql-version) | string | true | | Version of PostgreSQL. e.g 16 |
<!-- AUTO-DOC-INPUT:END -->
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Install PostgreSQL on the GitHub actions runner and verify the inst
author: tj-actions
inputs:
postgresql-version:
description: 'Version of PostgreSQL. e.g 15'
description: 'Version of PostgreSQL. e.g 16'
required: true

runs:
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ if ! [[ "$INPUT_POSTGRESQL_VERSION" =~ ^[0-9]+$ ]]; then
exit 1
fi

# Check if the input is between 10 and 15 (inclusive)
if (( INPUT_POSTGRESQL_VERSION < 10 || INPUT_POSTGRESQL_VERSION > 15 )); then
echo "Error: $INPUT_POSTGRESQL_VERSION is not between 10 and 15 (inclusive)."
# Check if the input is between 11 and 16 (inclusive)
if (( INPUT_POSTGRESQL_VERSION < 11 || INPUT_POSTGRESQL_VERSION > 16 )); then
echo "Error: $INPUT_POSTGRESQL_VERSION is not between 11 and 16 (inclusive)."
exit 1
fi

Expand Down

0 comments on commit 85c3755

Please sign in to comment.