GitHub Branch-Deploy Action输出字符被*替换的问题求助
问题
在GitHub Actions中运行branch-deploy工作流时,出现大量字符被*替换的异常输出:
Run github/brnch-deploy@v5.2.2
environment: development
issueops commnd used with prmeters
✔️ PR is ***pproved nd ll CI checks pssed - OK
LuksMeine is the owner of the lock
流水线中其他Action运行正常,仅该Action出现此问题。我的deploy.yaml配置如下:
deploy: if: ${{ github.event.issue.pull_request }} # only run on pull request comments runs-on: ubuntu-latest needs: test steps: # The branch-deploy Action - uses: github/branch-deploy@v5.2.2 id: branch-deploy with: trigger: "please deploy to" reaction: "eyes" stable_branch: "main" prefix_only: "true" merge_deploy_mode: "true" - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Checkout Pull Request run: hub pr checkout ${{ github.event.issue.number }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
请问是什么原因导致了这种情况?
原因分析
这是github/branch-deploy Action内置的**模糊处理(redaction)**机制导致的,目的是保护敏感信息,但v5.2.2版本的规则存在误触发问题:
- 该Action会自动扫描输出内容,将匹配特定模式的文本替换为
*,但旧版本的规则不够精准,误把普通文本(如branch、command、approved、LucasMeine)识别为需要模糊的内容。 - 这个问题在该Action的后续版本中已被修复,官方调整了模糊处理规则,避免对正常文本的误替换。
解决办法
- 升级
github/branch-deploy到最新稳定版本,比如将配置中的@v5.2.2替换为@v6或官方最新的标签版本。 - 若暂时无法升级,可在Action参数中添加
redact: "false"来禁用模糊处理功能(注意:仅确认输出无敏感信息时使用此方法)。
内容的提问来源于stack exchange,提问作者Lucas Meine
相关产品推荐
相关产品推荐

