Skip to content

Commit

Permalink
db: github action
Browse files Browse the repository at this point in the history
  • Loading branch information
gaboesquivel committed Jan 29, 2024
1 parent d9d174d commit 80ecd65
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/supabase-migrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Supabase Migrations

on:
push:
branches:
- main # or your default branch
paths:
- 'apps/supabase/**' # Trigger only when there are changes in the Supabase app

jobs:
run-migrations:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Set up working directory
run: cd apps/supabase

- name: Run Supabase Migrations
run: |
curl -L https://github.com/supabase/cli/releases/latest/download/supabase_linux -o supabase
chmod +x supabase
./supabase link --project-ref kvdrzfyetdzigjkmgwgn --anon-key "$ANON_KEY" --service-role-key "$SERVICE_ROLE_KEY"
./supabase db push
env:
ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
working-directory: ./apps/supabase

0 comments on commit 80ecd65

Please sign in to comment.