Skip to content

Commit d93680c

Browse files
author
Shlok
committed
ci: skip Supabase cache update on forks
Forks don't inherit SUPABASE_URL / SUPABASE_SERVICE_KEY secrets, so the update-cache job was failing on every push to a fork's main branch. Add a github.repository check so only the canonical upstream repo runs the cache update; the pytest validate job still runs everywhere as a sanity check.
1 parent 04aa98d commit d93680c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/deploy-data.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ jobs:
4646
run: pytest tests/ -v
4747

4848
# ── Job 2: Update Supabase cache ─────────────────────────────────
49-
# Runs only after validation passes. Skipped on pull requests.
49+
# Runs only after validation passes. Skipped on pull requests AND on
50+
# forks — forks don't inherit the SUPABASE_URL / SUPABASE_SERVICE_KEY
51+
# secrets, so the import would fail. Only the canonical upstream repo
52+
# is allowed to write to the production / staging Supabase project.
5053
update-cache:
5154
needs: validate
52-
if: github.event_name != 'pull_request'
55+
if: github.event_name != 'pull_request' && github.repository == 'path-avmap/av-map-data'
5356
runs-on: ubuntu-latest
5457

5558
steps:

0 commit comments

Comments
 (0)