name: install-postgresql description: Install PostgreSQL on the GitHub actions runner and verify the installation. author: tj-actions inputs: postgresql-version: description: 'Version of PostgreSQL. e.g 15' required: true runs: using: 'composite' steps: - run: | bash $GITHUB_ACTION_PATH/entrypoint.sh shell: bash 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 }} - 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 }}.*" exit 1 fi shell: bash branding: icon: hard-drive color: white