Skip to content

Commit

Permalink
Create backup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ison authored Mar 14, 2024
1 parent 4445c5a commit 3baffd8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'backup-database'
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
supabase_db_url: postgres://postgres.qpfpqzjzriwrmtnwawit:[email protected]:5432/postgres # For example: postgresql://postgres:[YOUR-PASSWORD]@db.<ref>.supabase.co:5432/postgres
steps:
- uses: actions/checkout@v2
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Backup roles
run: supabase db dump --db-url "$supabase_db_url" -f roles.sql --role-only
- name: Backup schema
run: supabase db dump --db-url "$supabase_db_url" -f schema.sql
- name: Backup data
run: supabase db dump --db-url "$supabase_db_url" -f data.sql --data-only --use-copy

0 comments on commit 3baffd8

Please sign in to comment.