diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index e7d45d5d..7e1989b9 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -12,14 +12,18 @@ jobs: if: ${{ github.repository_owner == 'SwiftLeeds' }} steps: - - name: Install PostgreSQL client - run: sudo apt-get update && sudo apt-get install -y postgresql-client + - name: Install PostgreSQL 17 client + run: | + sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - + sudo apt-get update + sudo apt-get install -y postgresql-client-17 - name: Dump production database (public schema only) env: DATABASE_URL: ${{ secrets.DATABASE_URL }} run: | - pg_dump "$DATABASE_URL" \ + /usr/lib/postgresql/17/bin/pg_dump "$DATABASE_URL" \ --schema=public \ --no-owner \ --no-privileges \ @@ -30,7 +34,7 @@ jobs: env: STAGING_DATABASE_URL: ${{ secrets.STAGING_DATABASE_URL }} run: | - pg_restore \ + /usr/lib/postgresql/17/bin/pg_restore \ --clean \ --if-exists \ --no-owner \