File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 70
70
sudo apt-get install postgresql-$PG_VERSION-postgis-3
71
71
shell : bash
72
72
73
+ - name : Check PostgreSQL version (macOS)
74
+ if : runner.os == 'macOS'
75
+ id : pg-version-mac
76
+ shell : bash
77
+ run : |
78
+ # Check if PostgreSQL service is running via Homebrew
79
+ PG_SERVICE=$(brew services list | grep postgresql | grep started || true)
80
+ if [ -z "$PG_SERVICE" ]; then
81
+ echo "Error: No PostgreSQL service is running via Homebrew"
82
+ exit 1
83
+ fi
84
+
85
+ # Extract the formula name from service info
86
+ PG_FORMULA=$(echo "$PG_SERVICE" | awk '{print $1}')
87
+ # Extract version number from formula (e.g., postgresql@14 -> 14)
88
+ PG_VERSION=$(echo "$PG_FORMULA" | cut -d@ -f2)
89
+ echo "Found running PostgreSQL service: $PG_FORMULA (version $PG_VERSION)"
90
+
91
+ # Output version for next steps
92
+ echo "version=$PG_VERSION" >> $GITHUB_OUTPUT
93
+
73
94
- name : Install PostGIS on macOS
74
95
if : runner.os == 'macOS'
75
96
shell : bash
You can’t perform that action at this time.
0 commit comments