Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

ci: separate dispatch jobs for migrations and functions

Brad Barbinb59b9fd609a3
diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml
new file mode 100644
index 0000000000..18f2ff7fbb
--- /dev/null
+++ b/.github/workflows/functions.yml
@@ -0,0 +1,25 @@
+name: Deploy Edge Functions
+on:
+ push:
+ branches: [main]
+ paths: ["packages/database/supabase/functions/**"]
+ paths-ignore: ["packages/database/supabase/functions/lib/types.ts"]
+
+jobs:
+ dispatch:
+ name: Dispatch
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ repo: ["barbinbrad/fiber"]
+ timeout-minutes: 5
+ steps:
+ - name: Dispatch functions to fiber
+ run: |
+ curl -L \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ https://api.github.com/repos/${{ matrix.repo }}/dispatches \
+ -d '{"event_type":"functions","client_payload":{"key": "${{ secrets.DISPATCH_KEY_PROD }}"}}'
diff --git a/.github/workflows/supabase.yml b/.github/workflows/migrations.yml
similarity index 68%
rename from .github/workflows/supabase.yml
rename to .github/workflows/migrations.yml
index 403bf2445f..3f31b4a1fd 100644
--- a/.github/workflows/supabase.yml
+++ b/.github/workflows/migrations.yml
@@ -1,8 +1,8 @@
-name: Update Supabase
+name: Deploy Migrations
on:
push:
branches: [main]
- paths: ["packages/database/supabase/**"]
+ paths: ["packages/database/supabase/migrations/**"]
jobs:
dispatch:
@@ -13,7 +13,7 @@ jobs:
repo: ["barbinbrad/fiber"]
timeout-minutes: 5
steps:
- - name: Dispatch to fiber
+ - name: Dispatch migrations to fiber
run: |
curl -L \
-X POST \
@@ -21,4 +21,4 @@ jobs:
-H "Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ matrix.repo }}/dispatches \
- -d '{"event_type":"supabase","client_payload":{"key": "${{ secrets.DISPATCH_KEY_PROD }}"}}'
+ -d '{"event_type":"migrations","client_payload":{"key": "${{ secrets.DISPATCH_KEY_PROD }}"}}'