-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 965 Bytes
/
infrastructure.yaml
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
name: infrastructure
on:
push:
paths:
- 'infrastructure/**'
- '.github/workflows/infrastructure.yaml'
workflow_dispatch:
defaults:
run:
working-directory: ./infrastructure
jobs:
build:
runs-on: ubuntu-latest
env:
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Setup Supabase
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
PROJECT_ID: ${{ vars.PROJECT_ID }}
run: |
supabase login --token $SUPABASE_ACCESS_TOKEN
supabase link --project-ref $PROJECT_ID
supabase db start
- name: Run Tests
run: supabase db test
- name: Deploy Database
run: supabase db push --include-seed
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'