-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.06 KB
/
validate-supabase.yml
File metadata and controls
46 lines (38 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Validate Supabase
on:
pull_request:
push:
branches:
- main
jobs:
replay:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect Supabase changes
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
supabase:
- "supabase/**"
- name: Skip replay when Supabase files are unchanged
if: steps.changes.outputs.supabase != 'true'
run: echo "No Supabase changes detected; skipping replay."
- name: Set up Supabase CLI
if: steps.changes.outputs.supabase == 'true'
uses: supabase/setup-cli@v1
with:
version: latest
- name: Start local Supabase stack
if: steps.changes.outputs.supabase == 'true'
run: supabase start
- name: Replay migrations and seed data
if: steps.changes.outputs.supabase == 'true'
run: supabase db reset