diff --git a/.github/workflows/clean-db.yml b/.github/workflows/clean-db.yml index fffc1fa..d5e8ab6 100644 --- a/.github/workflows/clean-db.yml +++ b/.github/workflows/clean-db.yml @@ -1,8 +1,9 @@ name: 🧹 Clean Database on: - schedule: - - cron: '0 0 1 * *' + push: + branches: + - dev jobs: refresh: @@ -10,9 +11,5 @@ jobs: runs-on: ubuntu-22.04 steps: - name: 🧹 Clean Database - run: | - curl -X POST \ - -H 'Authorization: Bearer ${{ secrets.STAGING_TURSO_DB_AUTH_TOKEN }}' \ - -H 'Content-Type: application/json' \ - -d '{ "requests": [ { "type": "execute", "stmt": { "sql": "DELETE * from session WHERE expiration_at < unixepoch()" } }, { "type": "close" } ] }' \ - https://${{ secrets.TURSO_DATABASE_NAME }}-${{ secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline + run: + curl -X POST -H 'Authorization: Bearer ${{ secrets.STAGING_TURSO_DB_AUTH_TOKEN }}' -H 'Content-Type: application/json' -d '{ "requests": [ { "type": "execute", "stmt": { "sql": "DELETE FROM session WHERE expiration_at < unixepoch()*1000" } }, { "type": "close" } ] }' https://${{ secrets.TURSO_DATABASE_NAME }}-${{ secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline