ci: enable turbo remote cache on trusted publish events #1424
+6
-4
@@ -38,10 +38,12 @@ when:
|
|||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
|
||||||
# Turbo remote cache (turbo.mosaicstack.dev) is configured via Woodpecker
|
# Turbo remote cache (turbo.mosaicstack.dev) is wired in publish.yml via the
|
||||||
# repository-level environment variables (TURBO_API, TURBO_TEAM, TURBO_TOKEN).
|
# org-level Woodpecker secret `turbo_token` (events: push/tag/cron/manual/
|
||||||
# This avoids from_secret which is blocked on pull_request events.
|
# deployment — never pull_request). This PR pipeline deliberately gets no
|
||||||
# If the env vars aren't set, turbo falls back to local cache only.
|
# 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:
|
steps:
|
||||||
install:
|
install:
|
||||||
|
|||||||
@@ -73,6 +73,13 @@ steps:
|
|||||||
# being empty) and on any incomplete verification.
|
# being empty) and on any incomplete verification.
|
||||||
verify:
|
verify:
|
||||||
image: *node_image
|
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:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
# (a) Commit identity: the provider's claimed SHA must equal the actual
|
# (a) Commit identity: the provider's claimed SHA must equal the actual
|
||||||
@@ -108,6 +115,13 @@ steps:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
image: *node_image
|
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:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm build
|
- pnpm build
|
||||||
|
|||||||
Reference in New Issue
Block a user