Repository navigation
ci(readme): Sync README 改为通过 bot PR 同步,适配受保护的 main - #30
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.
Sync README在 #25、#26、#28 之后的运行都失败了:仓库规则集「Only owners merge main」禁止直接推送main,工作流最后一步git push origin HEAD:main被拒绝(GH013),README 总览因此落后于索引(#29 里手工补过一次)。改动
.github/workflows/sync-readme.yml:不再推送main,改为和Track plugin releases一致的 bot PR 流程。bot/sync-readme,push --force,已有打开的 PR 就更新标题和描述,否则新开 PR。bot/sync-readmePR,就关闭它并删除分支。contents: write+pull-requests: write;令牌用secrets.STORE_BOT_TOKEN || github.token,与追踪工作流相同。if: github.ref == 'refs/heads/main',手动运行时不会在功能分支上渲染并开 PR。CONTRIBUTING.md:两处说明改为“开bot/sync-readmePR 同步”。docs/maintainers.md:新增“自动同步 README 总览”一节:流程、需要的仓库设置、同步 PR 只应包含README.md。验证
actionlint .github/workflows/sync-readme.yml无告警;node scripts/render-readme.mjs --check通过;node --test scripts/*.test.mjs46 个通过。main上运行,合并后需要在 Actions 里手动运行一次Sync README,确认它能创建 bot PR(或在已一致时直接结束)。注意
STORE_BOT_TOKEN(gh secret list为空),所以 bot PR 不会触发Validate index,合并前需要手动运行一次检查,与追踪新版本的 PR 一样。Track plugin releases在同一个提交里一并重新生成 README。