Skip to content

Merge pull request #31 from ubiquity-os-marketplace/development #9

Merge pull request #31 from ubiquity-os-marketplace/development

Merge pull request #31 from ubiquity-os-marketplace/development #9

Workflow file for this run

name: Database
on:
push:
branches:
- main
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
jobs:
generate_types:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Generate Supabase Types
run: |
bun install --frozen-lockfile
bun run "supabase:generate:remote"
- name: Commit and Push generated types
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add src/types/database.ts
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then
git commit -m "chore: updated generated Supabase types" || echo "Lint-staged check failed"
git push origin main
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}