Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/keep-alive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Keep Supabase Alive

on:
schedule:
# Use an "odd" time like 05:23 to avoid the "midnight rush" on GitHub's servers
- cron: '23 5 */5 * *'
workflow_dispatch:

jobs:
ping:
runs-on: ubuntu-latest
steps:
- name: Ping Supabase API
run: |
STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X GET "${{ secrets.SUPABASE_URL }}/rest/v1/" \
-H "apikey: ${{ secrets.SUPABASE_ANON_KEY }}" \
-H "Authorization: Bearer ${{ secrets.SUPABASE_ANON_KEY }}")

echo "Supabase responded with status: $STATUS"
if [ "$STATUS" -eq 200 ]; then
exit 0
else
echo "Warning: Received status $STATUS"
exit 1
fi