Skip to content

Commit cdaf27c

Browse files
committed
Add heartbeat functionality to Supabase DB with POST request
1 parent 69a4d4b commit cdaf27c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/supabase-heartbeat.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,14 @@ jobs:
4444
echo "Response: $RESPONSE_BODY"
4545
exit 1
4646
fi
47+
48+
- name: Send heartbeat to Supabase DB
49+
run: |
50+
RESPONSE=$(curl -s -w "%{http_code}" -o response_body.txt \
51+
-X POST \
52+
"https://tkkghzcpwefwrgacgvdv.supabase.co/rest/v1/heartbeat" \
53+
-H "apikey: ${{ secrets.SUPABASE_ANON_KEY }}" \
54+
-H "Authorization: Bearer ${{ secrets.SUPABASE_ANON_KEY }}" \
55+
-H "Content-Type: application/json" \
56+
-H "Prefer: resolution=merge-duplicates" \
57+
-d '{"id": 1, "touched_at": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}')

0 commit comments

Comments
 (0)