donniean / collections

MIT License
0 stars 0 forks source link

GitHub Actions token #535

Open donniean opened 1 month ago

donniean commented 1 month ago

最先开始 .github/workflows/dependencies.bump.yml.github/workflows/pull-requests.auto-update.yml 等一些 GitHub Actions 使用的 token 是 GITHUB_TOKEN

这样 git commits 的 author 就是 github-actions[bot] ,但是会导致一个问题一些 checks 卡住,一只显示 Expected — Waiting for status to be reported ,无法合并。

CleanShot 2024-08-01 at 17 49 02@2x


所以目前的 token 用的是 PAT (Personal Access Tokens) ,这样 checks 可以正常执行,但是产生了新问题: git commits 的 author 是用户,而不是 github-actions[bot]


目标是既可以正常合并,git commits 的 author 又是 github-actions[bot]


参考 https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

donniean commented 1 month ago

另外 .github/workflows/pull-requests.auto-merge.yml 中的 if 也会受影响。

https://github.com/donniean/collections/pull/537