Repository navigation
ci: PR 检查加 merge_group 触发,加 zizmor 和 Dependabot - #15
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.
为以后把 CI 设成合并门槛、开合并队列做准备,同时给 workflow 加自动安全检查和依赖更新。
Refs ModAVD/ModAVD#127
改了什么
1. 触发统一
check.yml的触发改成pull_request、push(只限main)、merge_group、workflow_dispatch。原来push不限分支,现在收到main;fork 上的分支推送不再单独跑一遍,PR 里照样跑。2. workflow 安全检查(zizmor)
check.yml里新加一个 jobWorkflow security (zizmor):pip installzizmor 1.32.0,版本和 wheel 的 SHA-256 都钉死(--require-hashes --only-binary=:all:),不用第三方 action。.github/workflows和.github/dependabot.yml,用默认的 regular 档位,结果以 GitHub 注释的形式标在 PR 上,有发现就失败。github.token,开启 zizmor 的在线检查(核对钉住的 SHA 确实属于那个 action 仓库、有没有已知漏洞的 action 版本)。现有 workflow 没有扫出问题,不用改、也没有忽略项。
3. Dependabot
新加
.github/dependabot.yml:github-actions,每月检查一次,每个生态合成一个 PR;新版本发布满 7 天才提(cooldown,zizmor 也要求这一项)。检查过的