mirror of
https://github.com/tj-actions/install-postgresql.git
synced 2024-12-20 01:18:18 +00:00
Merge branch 'main' into chore/update-readme
This commit is contained in:
commit
74524f5979
2 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies
|
||||||
- name: Setup PostgreSQL
|
- name: Setup PostgreSQL
|
||||||
uses: tj-actions/install-postgresql@v1
|
uses: tj-actions/install-postgresql@v1
|
||||||
with:
|
with:
|
||||||
postgresql_version: 15
|
postgresql-version: 15
|
||||||
```
|
```
|
||||||
|
|
||||||
> NOTE: This updates the installed PostgreSQL version with the specified version and updates the PATH.
|
> NOTE: This updates the installed PostgreSQL version with the specified version and updates the PATH.
|
||||||
|
@ -28,7 +28,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies
|
||||||
|
|
||||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
| 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 15 |
|
||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:END -->
|
<!-- AUTO-DOC-INPUT:END -->
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ name: install-postgresql
|
||||||
description: Install PostgreSQL on the GitHub actions runner and verify the installation.
|
description: Install PostgreSQL on the GitHub actions runner and verify the installation.
|
||||||
author: tj-actions
|
author: tj-actions
|
||||||
inputs:
|
inputs:
|
||||||
postgresql_version:
|
postgresql-version:
|
||||||
description: 'Version of PostgreSQL. e.g 15'
|
description: 'Version of PostgreSQL. e.g 15'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
@ -15,14 +15,14 @@ runs:
|
||||||
env:
|
env:
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
||||||
INPUT_POSTGRESQL_VERSION: ${{ inputs.postgresql_version }}
|
INPUT_POSTGRESQL_VERSION: ${{ inputs.postgresql-version }}
|
||||||
|
|
||||||
- name: Verify PostgreSQL
|
- name: Verify PostgreSQL
|
||||||
run: |
|
run: |
|
||||||
# Check the postgresql version
|
# Check the postgresql version
|
||||||
POSTGRESQL_VERSION=$(psql --version | awk '{print $3}')
|
POSTGRESQL_VERSION=$(psql --version | awk '{print $3}')
|
||||||
if [[ "$POSTGRESQL_VERSION" != "${{ inputs.postgresql_version }}."* ]]; then
|
if [[ "$POSTGRESQL_VERSION" != "${{ inputs.postgresql-version }}."* ]]; then
|
||||||
echo "PostgreSQL version $POSTGRESQL_VERSION does not match the expected version ${{ inputs.postgresql_version }}.*"
|
echo "PostgreSQL version $POSTGRESQL_VERSION does not match the expected version ${{ inputs.postgresql-version }}.*"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Add table
Reference in a new issue