Repository navigation
ci: deploy.yml 三资源 ID 引用改为 secrets.,删除 Mask resource IDs 步 (ONE-482 / ONE-491) - #153
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
返工单:ONE-491(父单 ONE-482)—— 方案改道为 Secrets v2.0。旧 PR #152 已合并,本 PR 在其合并后 main(
e55e6cd)基础上另开新分支,不触碰 #152。改动(仅
.github/workflows/deploy.yml,+3 / −13)Mask resource IDs整个 step(含其后的空行)。该步是 v1 方案遗留,且其自身 env 头在::add-mask::注册前会被 Actions 原样渲染进日志——正是残留泄漏点。Inject resource IDs步的 env 块:D1_DATABASE_ID:vars.→secrets.KV_NAMESPACE_ID:vars.→secrets.CLOUDFLARE_ACCOUNT_ID:vars.→secrets.D1_DATABASE_NAME一字未动,仍为${{ vars.D1_DATABASE_NAME || 'shortlink' }}明文。APP_URL、TABLE_PREFIX仍是vars.)。改完后的效果:三项 ID 由 GitHub 在 job 首屏渲染前按 Secrets 预注册掩码,
Inject resource IDs步的 env 头本身就会显示***,没有 v1 的时序窗口。生效前置(用户在 GitHub 设置里自建,团队不经手)
CLOUDFLARE_ACCOUNT_ID、D1_DATABASE_IDKV_NAMESPACE_ID值没建好之前不要合并部署:
Inject resource IDs步的check正则对空值会直接报错退出,属预期 fail-closed,不会用空值覆盖线上配置。自查
YAML.load_file解析通过;deployjob 共 15 steps(原 16,删掉 1 个),steps[0]回到actions/checkout@v6。Inject resource IDs的 env 来源:D1_DATABASE_ID/KV_NAMESPACE_ID/CLOUDFLARE_ACCOUNT_ID=secrets,D1_DATABASE_NAME=vars。vars.D1_DATABASE_ID/vars.KV_NAMESPACE_ID/vars.CLOUDFLARE_ACCOUNT_ID在 deploy.yml 之外与之内均 0 处残留(README、wrangler.toml 里只有占位符与文档说明,非vars.引用,无需改动)。Test deploy scripts)。本 PR 不合并不部署,等父单关口放行。