Skip to content

Commit

Permalink
Update action.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mansueli authored Mar 25, 2023
1 parent dffb6de commit 8635d26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ inputs:
runs:
using: "composite"
steps:
- name: Postgres15
- name: Postgres15
shell: bash
run: |
sudo apt-get remove postgresql-client-common
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 tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
sudo apt update
sudo apt install postgresql-15 postgresql-client-15 -y
/usr/lib/postgresql/15/bin/pg_dump --clean --if-exists --quote-all-identifiers --schema '*' --exclude-schema 'extensions|graphql|graphql_public|net|pgbouncer|pgsodium|pgsodium_masks|realtime|supabase_functions|storage|pg_*|information_schema' -d postgres://postgres:${{ supabase_url }}@${{ supabase_password }}:6543/postgres > dump.sql
shell: bash

- name: Tweaking the dump file
shell: bash
run: |
sed -i -e 's/^DROP SCHEMA IF EXISTS "auth";$/-- DROP SCHEMA IF EXISTS "auth";/' dump.sql
sed -i -e 's/^DROP SCHEMA IF EXISTS "storage";$/-- DROP SCHEMA IF EXISTS "storage";/' dump.sql
sed -i -e 's/^CREATE SCHEMA "auth";$/-- CREATE SCHEMA "auth";/' dump.sql
sed -i -e 's/^CREATE SCHEMA "storage";$/-- CREATE SCHEMA "storage";/' dump.sql
sed -i -e 's/^ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin"/-- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin"/' dump.sql
shell: bash

branding:
icon: database
color: green

0 comments on commit 8635d26

Please sign in to comment.