diff --git a/README.md b/README.md index 7812447..a8edebe 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This Github action installs PostgreSQL on the GitHub actions runner and verifies - name: Setup PostgreSQL uses: tj-actions/install-postgresql@v1 with: - postgresql_version: 15 + postgresql-version: 15 ``` > 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 | |----------------------------------------------------------------------------------------|--------|----------|---------|-------------------------------| -| [postgresql\_version](#input_postgresql_version) | string | true | | Version of PostgreSQL. e.g 15 | +| [postgresql-version](#input_postgresql-version) | string | true | | Version of PostgreSQL. e.g 15 | diff --git a/action.yml b/action.yml index 7ff94ba..556ed82 100644 --- a/action.yml +++ b/action.yml @@ -2,7 +2,7 @@ name: install-postgresql description: Install PostgreSQL on the GitHub actions runner and verify the installation. author: tj-actions inputs: - postgresql_version: + postgresql-version: description: 'Version of PostgreSQL. e.g 15' required: true @@ -15,14 +15,14 @@ runs: env: # INPUT_ is not available in Composite run steps # 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 run: | # Check the postgresql version POSTGRESQL_VERSION=$(psql --version | awk '{print $3}') - if [[ "$POSTGRESQL_VERSION" != "${{ inputs.postgresql_version }}."* ]]; then - echo "PostgreSQL version $POSTGRESQL_VERSION does not match the expected version ${{ inputs.postgresql_version }}.*" + if [[ "$POSTGRESQL_VERSION" != "${{ inputs.postgresql-version }}."* ]]; then + echo "PostgreSQL version $POSTGRESQL_VERSION does not match the expected version ${{ inputs.postgresql-version }}.*" exit 1 fi shell: bash