-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.47 KB
/
database.yml
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
47
48
49
50
name: CI for database
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- .github/actions/install-pnpm/action.yml
- .github/actions/install-dependencies/action.yml
- .github/workflows/database.yml
- database/supabase/migrations/**
- database/package.json
permissions:
contents: write
jobs:
ci-supaback:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ./database
steps:
- name: ⚒️ Checkout the commit
uses: actions/checkout@v4
- name: 🔶 Install pnpm
uses: ./.github/actions/install-pnpm
- name: 📦 Install dependencies
uses: ./.github/actions/install-dependencies
- name: Install Supabase cli
uses: ./.github/actions/install-supabase
- name: Start Supabase local development setup
run: supabase start
- name: Generate types and SQL dump files
run: pnpm generate:types
- name: Push detected changes on generated files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(database): update types / generated files'
commit_options: '--no-verify'
file_pattern: 'database.types.ts *.generated.sql'
repository: './database'
- name: Verify Bot compilation
run: pnpm build
working-directory: ./bot