From f038ad49143abecd9aa18da6cf3435db72537cb9 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Tue, 10 Mar 2026 20:32:23 +0000 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20.gitea/workflows/update-types.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/update-types.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/update-types.yml diff --git a/.gitea/workflows/update-types.yml b/.gitea/workflows/update-types.yml new file mode 100644 index 0000000..20fd040 --- /dev/null +++ b/.gitea/workflows/update-types.yml @@ -0,0 +1,41 @@ +name: Update database types + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + update: + runs-on: ubuntu-latest + + env: + SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} + PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }} + + 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