caelum0x a8e8648a9b feat: composite action that keeps a free Supabase project from pausing
REST root ping + cheap table/rpc query with the anon key, retries with
backoff, job summary, early warnings (stale last success, weekly cron,
GitHub 60-day schedule disable), copy-paste workflow examples and a
curl-only fallback. Self-test workflow runs against a real endpoint.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-12 07:54:48 +03:00

26 lines
948 B
YAML

# Copy to .github/workflows/keep-alive.yml in any repository.
# Add two repository secrets: SUPABASE_URL and SUPABASE_ANON_KEY
# (Settings -> Secrets and variables -> Actions).
name: Keep Supabase alive
on:
schedule:
- cron: "17 6 * * *" # daily, 06:17 UTC; avoid :00 (GitHub's busiest minute)
workflow_dispatch: # lets you run it by hand from the Actions tab
permissions:
contents: read
actions: read # lets the action read its own previous runs for the early warning
jobs:
ping:
runs-on: ubuntu-latest
steps:
- uses: caelum0x/supabase-keep-alive-action@v1
with:
url: ${{ secrets.SUPABASE_URL }}
anon-key: ${{ secrets.SUPABASE_ANON_KEY }}
# one of these makes a real database query run (recommended):
table: keepalive # any small table; RLS with no anon policy is fine
# rpc: keepalive_ping # or a tiny function, see README