Skip to content

Commit 994c860

Browse files
authored
Merge pull request #376 from codeunia-dev/feat/supabase-disaster-recovery-system
Use PostgreSQL 17 Client Tools by Default in GitHub Actions
2 parents ab5e29d + 82402c8 commit 994c860

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/backup.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
sudo apt-get update
2727
# Install PostgreSQL 17 client tools
2828
sudo apt-get install -y postgresql-client-17
29+
# Set up alternatives to use PostgreSQL 17 by default
30+
sudo update-alternatives --install /usr/bin/psql psql /usr/lib/postgresql/17/bin/psql 100
31+
sudo update-alternatives --install /usr/bin/pg_dump pg_dump /usr/lib/postgresql/17/bin/pg_dump 100
32+
sudo update-alternatives --install /usr/bin/pg_restore pg_restore /usr/lib/postgresql/17/bin/pg_restore 100
2933
3034
- name: Verify tools installation
3135
run: |
@@ -55,6 +59,8 @@ jobs:
5559
chmod +x backup.sh
5660
# Explicitly export the environment variable
5761
export SUPABASE_DB_URL="${SUPABASE_DB_URL}"
62+
# Ensure PostgreSQL 17 binaries are in PATH
63+
export PATH="/usr/lib/postgresql/17/bin:$PATH"
5864
./backup.sh
5965
6066
- name: List backup files

0 commit comments

Comments
 (0)