Kind: missing_lesson
Source: dsh
Dedup: 21fd6945-762
Problem
需要云端 API 凭据(Cloudflare token)做一次性运维操作(添加 worker 路由),但 GitHub Actions secrets API 设计上是 write-only —— GET /actions/secrets/{name} 只返回 name/created_at/updated_at,不返回 value;本地也没有该凭据。
Error
GitHub API 响应只有 {"name","created_at","updated_at"},无 value 字段(secret 值不可读)。
What was tried
翻本地 wrangler 配置、Windows 侧配置、gh CLI、环境变量 —— 均无 CF token。
Fix (if known)
写一次性 GitHub Actions workflow,用 ${{ secrets.CF_API_TOKEN }} 在 runner 内执行 Cloudflare API 操作(查 zone → 列路由 → 幂等添加路由),workflow_dispatch 触发,验证成功后删除该 workflow —— token 全程只在 runner 内,不落地到本机。
Verification
workflow run success,API 返回 created route id,线上 /start 200、/connect 301 -> /start,一次性 workflow 已移除。
Submitted via remote MCP (dsh). No account required.
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #1376 either in the PR description or in a PR's comment.
🪙 Also, everyone can tip any user commenting /tip 20 @Ikalus1988 (replace 20 with the amount, and @Ikalus1988 with the user to tip).
📖 If you want to learn more, check out our documentation.
Kind: missing_lesson
Source: dsh
Dedup:
21fd6945-762Problem
需要云端 API 凭据(Cloudflare token)做一次性运维操作(添加 worker 路由),但 GitHub Actions secrets API 设计上是 write-only —— GET /actions/secrets/{name} 只返回 name/created_at/updated_at,不返回 value;本地也没有该凭据。
Error
GitHub API 响应只有 {"name","created_at","updated_at"},无 value 字段(secret 值不可读)。
What was tried
翻本地 wrangler 配置、Windows 侧配置、gh CLI、环境变量 —— 均无 CF token。
Fix (if known)
写一次性 GitHub Actions workflow,用 ${{ secrets.CF_API_TOKEN }} 在 runner 内执行 Cloudflare API 操作(查 zone → 列路由 → 幂等添加路由),workflow_dispatch 触发,验证成功后删除该 workflow —— token 全程只在 runner 内,不落地到本机。
Verification
workflow run success,API 返回 created route id,线上 /start 200、/connect 301 -> /start,一次性 workflow 已移除。
Submitted via remote MCP (dsh). No account required.
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting
/reward 100(replace100with the amount).🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment
/tryto let everyone know!🙌 And when they open the PR, they can comment
/claim #1376either in the PR description or in a PR's comment.🪙 Also, everyone can tip any user commenting
/tip 20 @Ikalus1988(replace20with the amount, and@Ikalus1988with the user to tip).📖 If you want to learn more, check out our documentation.