From 1f623cfdc1170bbab584b4abdcb7d8a0784f3434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mir=C3=B3=20Sorja?= Date: Thu, 28 Nov 2024 16:52:20 +0100 Subject: [PATCH] Fix Postgres tools version mismatch (#4159) * fix psql version * test * test --- .github/workflows/heroku-db-partial-backup.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/heroku-db-partial-backup.yml b/.github/workflows/heroku-db-partial-backup.yml index ab3db9e33f..e528a9857d 100644 --- a/.github/workflows/heroku-db-partial-backup.yml +++ b/.github/workflows/heroku-db-partial-backup.yml @@ -28,7 +28,14 @@ jobs: - name: Install PostgreSQL client and GPG run: | sudo apt-get update - sudo apt-get install -y postgresql-client gnupg + sudo apt-get install -y curl gnupg2 + curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/postgresql-keyring.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list + sudo apt-get update + sudo apt-get install -y postgresql-client-15 + + - name: Verify PostgreSQL version + run: pg_dump --version - name: Create Custom Database Backup env: @@ -36,6 +43,7 @@ jobs: HEROKU_APP: ${{ github.event.inputs.environment == 'production' && secrets.HEROKU_APP_NAME_PRODUCTION || secrets.HEROKU_APP_NAME_DEVELOPMENT }} BACKUP_DIR: ./backups run: | + export PATH="/usr/lib/postgresql/15/bin:$PATH" mkdir -p $BACKUP_DIR ./src/tools/heroku/partial-backup.sh