Supabase Keep Alive #249
This file contains hidden or 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: Supabase Keep Alive | |
| on: | |
| schedule: | |
| - cron: "0 */6 * * *" # 每6小时执行一次 | |
| workflow_dispatch: | |
| jobs: | |
| keep-alive: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Curl Supabase REST API | |
| run: | | |
| echo "Pinging Supabase API..." | |
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ | |
| -H "apikey: ${{ secrets.SUPABASE_KEY }}" \ | |
| "https://${{ secrets.SUPABASE_PROJECT_REF }}.supabase.co/rest/v1/") | |
| echo "Response status: $STATUS" | |
| if [ "$STATUS" -ne 200 ]; then | |
| echo "Supabase REST API did not return 200 OK" | |
| exit 1 | |
| fi |