0
0
Fork 0
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:
Tonye Jack 2023-09-12 11:23:26 -06:00 committed by GitHub
parent be57ba7832
commit 6e9de9d9b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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