Skip to content

Commit 71315fc

Browse files
committed
check pg version in macos runner
1 parent ed45ebb commit 71315fc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ runs:
7070
sudo apt-get install postgresql-$PG_VERSION-postgis-3
7171
shell: bash
7272

73+
- name: Check PostgreSQL version (macOS)
74+
if: runner.os == 'macOS'
75+
id: pg-version-mac
76+
shell: bash
77+
run: |
78+
# Get major version using psql
79+
PG_VERSION=$(psql -t -A -c "SELECT split_part(version(), ' ', 2)" '${{ steps.pg.outputs.connection-uri }}' | cut -d. -f1)
80+
echo "Found PostgreSQL major version: $PG_VERSION"
81+
82+
# Output version for next steps
83+
echo "version=$PG_VERSION" >> $GITHUB_OUTPUT
84+
7385
- name: Install PostGIS on macOS
7486
if: runner.os == 'macOS'
7587
shell: bash

0 commit comments

Comments
 (0)