From 9e5afed71e78be9b8592f6a50df8207bc2558596 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Tue, 10 Mar 2026 21:02:16 +0000 Subject: [PATCH] Actualizar .gitea/workflows/update-types.yml --- .gitea/workflows/update-types.yml | 47 ++++++++----------------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/update-types.yml b/.gitea/workflows/update-types.yml index 20fd040..012022b 100644 --- a/.gitea/workflows/update-types.yml +++ b/.gitea/workflows/update-types.yml @@ -1,41 +1,18 @@ name: Update database types - on: - schedule: - - cron: "0 0 * * *" + push: + branches: [ main ] + paths: + - '*.sql' jobs: - update: + build: runs-on: ubuntu-latest - - env: - SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} - PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }} - + if: github.head_ref != 'supabot**' steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v4 - with: - 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 \ No newline at end of file + - uses: lyqht/generate-supabase-db-types-github-action@main + with: + SUPABASE_REF_ID: ${{ secrets.SUPABASE_PROJECT_ID }} + SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} + DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }} + OUTPUT_PATH: db.types.ts \ No newline at end of file