From 7615737ca84283edd0cabf4b0e62a51ea3bd0a16 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:03:20 -0600 Subject: [PATCH 1/8] Update action.yml --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3de8805..c206faa 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: setup-postgresql -description: Install and verify PostgreSQL on the GitHub actions runner using a specified version +name: install-postgresql +description: Install and verify PostgreSQL on the GitHub actions runner using a specified version. author: tj-actions inputs: postgresql_version: From 85dc52a26987e5d1afdaa704066bd714065c2a73 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:08:11 -0600 Subject: [PATCH 2/8] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 863dda6..e57429b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ [![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge\&logo=ubuntu\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) [![Mac OS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge\&logo=macos\&logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) [![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\&logo=windows\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) -[![Public workflows that use this action.](https://img.shields.io/endpoint?style=for-the-badge\&url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fsetup-postgresql%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+setup-postgresql+path%3A.github%2Fworkflows+language%3AYAML\&s=\&type=Code) +[![Public workflows that use this action.](https://img.shields.io/endpoint?style=for-the-badge\&url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Finstall-postgresql%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+setup-postgresql+path%3A.github%2Fworkflows+language%3AYAML\&s=\&type=Code) -[![CI](https://github.com/tj-actions/setup-postgresql/workflows/CI/badge.svg)](https://github.com/tj-actions/setup-postgresql/actions?query=workflow%3ACI) -[![Update release version.](https://github.com/tj-actions/setup-postgresql/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/setup-postgresql/actions?query=workflow%3A%22Update+release+version.%22) +[![CI](https://github.com/tj-actions/install-postgresql/workflows/CI/badge.svg)](https://github.com/tj-actions/setup-postgresql/actions?query=workflow%3ACI) +[![Update release version.](https://github.com/tj-actions/install-postgresql/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/setup-postgresql/actions?query=workflow%3A%22Update+release+version.%22) -## setup-postgresql +## install-postgresql This Github action installs PostgreSQL on the GitHub actions runner and verifies the installation. @@ -15,7 +15,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies steps: - uses: actions/checkout@v4 - name: Setup PostgreSQL - uses: tj-actions/setup-postgresql@v1 + uses: tj-actions/instwll-postgresql@v1 with: postgresql_version: 15 ``` From 9f02d220ef4a554984977cd130f6922160fd460a Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:10:18 -0600 Subject: [PATCH 3/8] Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c206faa..2d41b20 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: install-postgresql -description: Install and verify PostgreSQL on the GitHub actions runner using a specified version. +description: Install PostgreSQL on the GitHub actions runner and verify the installation. author: tj-actions inputs: postgresql_version: From 5c580e9f4d863345f70595e8b9d4c53136d19cbf Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:12:57 -0600 Subject: [PATCH 4/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e57429b..18b8f1e 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies postgresql_version: 15 ``` +> NOTE: This updates the installed PostgreSQL version with the specified version and updates the PATH. + ## Inputs From 6b689fb89bd7475c56b6098df794c0504759e6f2 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:15:54 -0600 Subject: [PATCH 5/8] Update test.yml --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb83f1d..8ddb3cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,3 +35,8 @@ jobs: uses: ./ with: postgresql_version: ${{ matrix.postgresql_version }} + - name: Verify PostgreSQL + run: | + pg_dump --version + psql --version + pg_restore --version From fa28f5b8416bc746c9a8dee6c772bde3825b275d Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:18:12 -0600 Subject: [PATCH 6/8] Update entrypoint.sh --- entrypoint.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9290fe7..4812762 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -52,13 +52,10 @@ echo "Verifying installation..." # Verify installation by running pg_dump directly if [[ "$(uname -s)" == "NT"* ]] || [[ "$(uname -s)" == "MINGW"* ]] || [[ "$(uname -s)" == *"MSYS"* ]]; then - "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin\\pg_dump" --version echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> $GITHUB_PATH elif [[ "$(uname -s)" == "Darwin" ]]; then - "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin/pg_dump" --version echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> $GITHUB_PATH else - "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin/pg_dump" --version echo "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin" >> $GITHUB_PATH fi From 9dc2432a2aefc53573a15645680e0f77aeb7a28c Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:19:17 -0600 Subject: [PATCH 7/8] Update entrypoint.sh --- entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/entrypoint.sh b/entrypoint.sh index 4812762..8e649c6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -52,6 +52,7 @@ echo "Verifying installation..." # Verify installation by running pg_dump directly if [[ "$(uname -s)" == "NT"* ]] || [[ "$(uname -s)" == "MINGW"* ]] || [[ "$(uname -s)" == *"MSYS"* ]]; then + # shellcheck disable=SC2028 echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> $GITHUB_PATH elif [[ "$(uname -s)" == "Darwin" ]]; then echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> $GITHUB_PATH From 4ccfd6e287769440853a28ee460fd13a69378095 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 12 Sep 2023 07:20:37 -0600 Subject: [PATCH 8/8] Update entrypoint.sh --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8e649c6..2eef567 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -53,11 +53,11 @@ echo "Verifying installation..." # Verify installation by running pg_dump directly if [[ "$(uname -s)" == "NT"* ]] || [[ "$(uname -s)" == "MINGW"* ]] || [[ "$(uname -s)" == *"MSYS"* ]]; then # shellcheck disable=SC2028 - echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> $GITHUB_PATH + echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> "$GITHUB_PATH" elif [[ "$(uname -s)" == "Darwin" ]]; then - echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> $GITHUB_PATH + echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> "$GITHUB_PATH" else - echo "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin" >> $GITHUB_PATH + echo "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin" >> "$GITHUB_PATH" fi echo "Complete"