mirror of
https://github.com/tj-actions/install-postgresql.git
synced 2024-12-20 01:18:18 +00:00
Update action.yml
This commit is contained in:
parent
be57ba7832
commit
6e9de9d9b0
1 changed files with 4 additions and 4 deletions
|
@ -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