Skip to content

Commit 562aa30

Browse files
committed
fix(docs): map the Cloudflare secrets explicitly instead of inheriting all
`secrets: inherit` handed the reusable documentation workflow every secret this repo holds — the Nextcloud signing cert and key, the appstore token, the deploy keys — for the sake of two Cloudflare values. It also would not have worked. The org secrets are CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID and `inherit` passes secrets under their original names, while the callee reads CF_API_TOKEN / CF_ACCOUNT_ID — so the publish step would still have skipped itself and the run would still have gone green over an unchanged live site. Maps the two names explicitly instead, so nothing else crosses the boundary. Depends on ConductionNL/.github#568, which declares both as optional secrets on the callee: an explicit mapping only compiles for names the callee declares.
1 parent f1e50ea commit 562aa30

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,25 @@ on:
99
jobs:
1010
deploy:
1111
uses: ConductionNL/.github/.github/workflows/documentation.yml@main
12-
# A called workflow receives NO secrets from its caller unless they are
13-
# passed explicitly or inherited — `with:` carries inputs, never secrets.
14-
# Without this line `secrets.CF_API_TOKEN` is EMPTY inside the callee, so
15-
# its "Publish to the Cloudflare Worker" step skips itself on its own
16-
# guard and the run finishes GREEN having written only gh-pages, which
17-
# nothing serves. The live site never changes and no check goes red to
18-
# say so — the exact failure mode the pinned inputs below guard against,
19-
# arriving one layer earlier.
20-
secrets: inherit
12+
# A reusable workflow receives NO secrets by default. Without this block
13+
# `secrets.CF_API_TOKEN` is empty inside the callee, its "Publish to the
14+
# Cloudflare Worker" step skips itself on its own guard, and the run
15+
# finishes GREEN having written only gh-pages — which nothing serves. The
16+
# live site never changes and no check goes red to say so.
17+
#
18+
# Mapped explicitly rather than `secrets: inherit`, because `inherit`
19+
# hands the callee EVERY secret this repo holds — signing cert and key,
20+
# appstore token, deploy keys — for the sake of two Cloudflare values.
21+
# This way only those two cross the boundary.
22+
#
23+
# The names also differ on each side (org `CLOUDFLARE_*`, callee `CF_*`),
24+
# and `inherit` passes secrets under their ORIGINAL names — so it would
25+
# have left `CF_API_TOKEN` empty even setting the exposure aside. Needs
26+
# ConductionNL/.github#568: a mapping only compiles for secrets the callee
27+
# declares.
28+
secrets:
29+
CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
30+
CF_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2131
with:
2232
# `keepiq.conduction.nl` resolves as of 2026-08-23 — attached as a second
2333
# custom domain on the SAME `doriath-docs` worker that serves

0 commit comments

Comments
 (0)