You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ties #11 (table) and #12 (geocoder) together: a workflow that keeps Supabase in sync whenever the repo's hackathon list changes, plus a weekly refresh. Mirror the existing automation patterns in .github/workflows/ (e.g. update_readmes.yml, gallery.yml).
What to build
New workflow .github/workflows/sync_supabase.yml:
Triggers:push with paths: ['.github/scripts/listings.json'] on main, weekly schedule cron, and workflow_dispatch.
Run a sync script that upserts into Supabase via REST: POST {SUPABASE_URL}/rest/v1/hackathons with headers apikey: <SERVICE_KEY>, Authorization: Bearer <SERVICE_KEY>, Prefer: resolution=merge-duplicates (upsert on id PK).
Optionally mark rows whose id is no longer in listings as is_visible=false (soft delete) so the globe drops them.
Commit the updated geocode_cache.json back to main (use the fetch+rebase+retry push pattern from the other workflows).
Context
Ties #11 (table) and #12 (geocoder) together: a workflow that keeps Supabase in sync whenever the repo's hackathon list changes, plus a weekly refresh. Mirror the existing automation patterns in
.github/workflows/(e.g.update_readmes.yml,gallery.yml).What to build
New workflow
.github/workflows/sync_supabase.yml:pushwithpaths: ['.github/scripts/listings.json']onmain, weeklyschedulecron, andworkflow_dispatch.pip install requests.geocode.py(Backend: Geocoding step + geocode cache (Nominatim) #12) to produce enriched records.POST {SUPABASE_URL}/rest/v1/hackathonswith headersapikey: <SERVICE_KEY>,Authorization: Bearer <SERVICE_KEY>,Prefer: resolution=merge-duplicates(upsert onidPK).idis no longer in listings asis_visible=false(soft delete) so the globe drops them.geocode_cache.jsonback to main (use the fetch+rebase+retry push pattern from the other workflows).SUPABASE_URL,SUPABASE_SERVICE_KEY(from Backend: Supabasehackathonstable + RLS read policy #11). Never echo/commit the key.Acceptance
id— re-runs don't duplicate)Part of #10 · Design spec · Repo data lives in
.github/scripts/listings.json