Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
db backup workflow cont
Browse files Browse the repository at this point in the history
  • Loading branch information
cisaacstern committed Dec 7, 2023
1 parent 87c7c71 commit abf31e1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test-db-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,20 @@ jobs:
sudo apt-get update
sudo apt-get install --yes postgresql-client
- name: Create database
run: |
echo "CREATE DATABASE restore;" | psql -h postgres -U postgres_user
env:
PGPASSWORD: postgres_password

# https://devcenter.heroku.com/articles/heroku-postgres-import-export#restore-to-local-database
- name: Restore database from file
run: |
echo "CREATE DATABASE restore;" | psql
pg_restore --verbose --clean --no-acl --no-owner \
-h localhost -U postgres_user -d restore \
-h postgres -U postgres_user -d restore \
db-backup/810fa5e1-9b78-4f3c-97e0-a1847b3a65e6
env:
PGPASSWORD: postgres_password

- name: Setup Python
uses: actions/setup-python@v5
Expand Down

0 comments on commit abf31e1

Please sign in to comment.