This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🧹 Clean Database | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
jobs: | ||
refresh: | ||
name: 🧹 Clean Database | ||
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()*1000" } }, { "type": "close" } ] }' https://${{ secrets.TURSO_DATABASE_NAME }}-${{ secrets.TURSO_ORG_NAME}}.turso.io/v2/pipeline | ||