Añadir .gitea/workflows/update-types.yml
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user