Actualizar .gitea/workflows/update-types.yml
Deploy Function / deploy (push) Successful in 27s
Deploy Migrations to Production / deploy (push) Successful in 14s

This commit is contained in:
2026-03-10 21:02:16 +00:00
parent 32c8a8814f
commit 9e5afed71e
+12 -35
View File
@@ -1,41 +1,18 @@
name: Update database types name: Update database types
on: on:
schedule: push:
- cron: "0 0 * * *" branches: [ main ]
paths:
- '*.sql'
jobs: jobs:
update: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.head_ref != 'supabot**'
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }}
steps: steps:
- uses: actions/checkout@v4 - uses: lyqht/generate-supabase-db-types-github-action@main
with: with:
fetch-depth: 0 SUPABASE_REF_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
- uses: actions/setup-node@v4 DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
with: OUTPUT_PATH: db.types.ts
node-version: 22
- run: npm run update-types
- name: Check for changes
id: git_status
run: |
echo "status=$(git status -s)" >> $GITHUB_OUTPUT
- name: Commit changes
if: ${{ contains(steps.git_status.outputs.status, ' ') }}
run: |
git add supabase/functions/_shared/database.types.ts
git config user.email "ci@gitea.local"
git config user.name "gitea-actions"
git commit -m "Update database types"
- name: Push changes
if: ${{ contains(steps.git_status.outputs.status, ' ') }}
run: git push