Skip to content

Commit 4167ff0

Browse files
committed
fix: install pg 18 for shadow apply workflow
1 parent d9baa77 commit 4167ff0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/shadow-apply-check-reusable.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ jobs:
4545
esac
4646
echo "db_url=$DB_URL" >> $GITHUB_OUTPUT
4747
48+
- name: Install PostgreSQL 18 client
49+
run: |
50+
sudo apt-get install -y --no-install-recommends curl ca-certificates gnupg
51+
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql.gpg
52+
echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
53+
sudo apt-get update
54+
sudo apt-get install -y --no-install-recommends postgresql-client-18
55+
4856
- name: Fetch URL and test connection
4957
id: shadow-db
5058
run: |
@@ -61,10 +69,10 @@ jobs:
6169
echo "PostgreSQL is ready!"
6270
6371
- name: Dump target database
64-
run: pg_dump -Fc -v -b "${{ steps.resolve-db-url.outputs.db_url }}" -f database.dump
72+
run: /usr/lib/postgresql/18/bin/pg_dump -Fc -v -b "${{ steps.resolve-db-url.outputs.db_url }}" -f database.dump
6573

6674
- name: Load dump into shadow database
67-
run: pg_restore -v --no-owner --no-acl --role=postgres -d "${{ steps.shadow-db.outputs.db_url }}" database.dump
75+
run: /usr/lib/postgresql/18/bin/pg_restore -v --no-owner --no-acl --role=postgres -d "${{ steps.shadow-db.outputs.db_url }}" database.dump
6876

6977
- uses: ariga/setup-atlas@v0
7078

0 commit comments

Comments
 (0)