Repository navigation
ONE-485 ONE-490: deploy 日志掩码(deploy.yml 加 ::add-mask::) - #30
Merged
Merged
Conversation
在 deploy job 内、Patch wrangler 配置与 Deploy Worker 之前插入掩码步, 值只经 env 传入,run 内用 ::add-mask:: 注册,空值跳过。 不掩 D1_DATABASE_NAME / TABLE_PREFIX,不动其他步骤与文件。
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.
背景
post 为公开仓库,Deploy 日志会把 Cloudflare 资源 ID(账号 ID / D1 数据库 ID / KV namespace ID)明文打进公开 Actions 日志。本 PR 是父单 ONE-485(舰队五仓统一改动)的 post 一仓。
改动(只改一个文件)
.github/workflows/deploy.yml:在deployjob 内、actions/checkout@v7之后,紧接新增Mask resource IDs一步,位于Patch配置注入与Deploy Worker之前。env:传入(D1_DATABASE_ID/KV_NAMESPACE_ID/CLOUDFLARE_ACCOUNT_ID,均为vars.*),不在run:内内联${{ vars.* }}。run内循环三个变量名注册::add-mask::,空值用[ -n "${!v}" ]守卫跳过,不注册空掩码。D1_DATABASE_NAME与TABLE_PREFIX;不改注入方式、不迁 Secrets、不动其他步骤顺序与其他文件。自检
Patch步读取的vars.*逐字一致(三项,脚本从现有文件取键名)。deploy.yml通过 YAML 解析(js-yaml)。::add-mask::。vars.出现位置均在KEY: ${{ vars.X }}行,run:内无内联。合并
合并即自动部署,合并关口归负责人。