diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 8132fa8d..34fb9235 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -38,10 +38,12 @@ when: - event: push branch: main -# Turbo remote cache (turbo.mosaicstack.dev) is configured via Woodpecker -# repository-level environment variables (TURBO_API, TURBO_TEAM, TURBO_TOKEN). -# This avoids from_secret which is blocked on pull_request events. -# If the env vars aren't set, turbo falls back to local cache only. +# Turbo remote cache (turbo.mosaicstack.dev) is wired in publish.yml via the +# org-level Woodpecker secret `turbo_token` (events: push/tag/cron/manual/ +# deployment — never pull_request). This PR pipeline deliberately gets no +# remote-cache credentials: an untrusted PR must not be able to write to (or +# poison) the shared cache. Without TURBO_* env vars turbo falls back to +# local cache only, which is the intended behavior here. steps: install: diff --git a/.woodpecker/publish.yml b/.woodpecker/publish.yml index bf6cdd3b..f75e64b5 100644 --- a/.woodpecker/publish.yml +++ b/.woodpecker/publish.yml @@ -73,6 +73,13 @@ steps: # being empty) and on any incomplete verification. verify: image: *node_image + environment: + # Turbo remote cache (see .woodpecker/ci.yml header comment): org-level + # secret, exposed only on trusted events (push/tag/cron/manual/deployment). + TURBO_API: https://turbo.mosaicstack.dev + TURBO_TEAM: mosaic + TURBO_TOKEN: + from_secret: turbo_token commands: - *enable_pnpm # (a) Commit identity: the provider's claimed SHA must equal the actual @@ -108,6 +115,13 @@ steps: build: image: *node_image + environment: + # Turbo remote cache (see .woodpecker/ci.yml header comment): org-level + # secret, exposed only on trusted events (push/tag/cron/manual/deployment). + TURBO_API: https://turbo.mosaicstack.dev + TURBO_TEAM: mosaic + TURBO_TOKEN: + from_secret: turbo_token commands: - *enable_pnpm - pnpm build