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: add script to run supabase migrations

Brad Barbin15308b19486a
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index cc3800ae16..0000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-github: barbinbrad
diff --git a/.github/workflows/supabase.yml b/.github/workflows/supabase.yml
index a4008473a4..cf1ff72934 100644
--- a/.github/workflows/supabase.yml
+++ b/.github/workflows/supabase.yml
@@ -6,20 +6,24 @@ on:
workflow_dispatch:
jobs:
- dispatch:
- name: Dispatch
+ supabase:
+ name: Supabase Sync
runs-on: ubuntu-latest
- strategy:
- matrix:
- repo: ["barbinbrad/fiber"]
- timeout-minutes: 5
+
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ SUPABASE_SERVICE_ROLE: ${{ secrets.SUPABASE_SERVICE_ROLE }}
+ SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
+
steps:
- - name: Dispatch migrations 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":"supabase","client_payload":{"key": "${{ secrets.DISPATCH_KEY_PROD }}"}}'
+ - uses: actions/checkout@v4
+
+ - uses: supabase/setup-cli@v1
+ with:
+ version: latest
+
+ - run: git pull origin main
+ - run: git submodule update --init --recursive
+ - run: git submodule update --recursive --remote
+ - run: npm install
+ - run: npm run ci:migrations