Skip to content
Closed
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
26 changes: 26 additions & 0 deletions .github/workflows/supabase-keep-alive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Supabase Keep Alive

# Supabase の Free のプロジェクトは、1 週間 DB の活動がないと止まる。数日おきに軽い読み取りを送る。
# 接続先は、Web 版のビルドと同じ公開してよい値 (Variables) を使う。失敗すると、GitHub が Actions の失敗を通知する。

on:
schedule:
- cron: '17 3 */3 * *'
workflow_dispatch:

permissions:
contents: read

jobs:
ping:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Query the database
env:
SUPABASE_URL: ${{ vars.EXPO_PUBLIC_SUPABASE_URL }}
SUPABASE_KEY: ${{ vars.EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY }}
run: |
curl -fsS --retry 3 --retry-all-errors -o /dev/null -w '%{http_code}\n' \
-H "apikey: $SUPABASE_KEY" \
"$SUPABASE_URL/rest/v1/profiles?select=id&limit=1"