状态徽章显示工作流程目前失败还是通过。 添加状态徽章的常见位置是仓库的 README.md 文件,但也可将其添加到您喜欢的任何网页。 默认情况下,徽章显示默认分支的状态。 您也可以在 URL 中使用 branch 和 event 查询参数显示特定分支或事件运行的工作流程状态。

您使用工作流程文件的名称来引用工作流程。

使用工作流程文件名称
此 Markdown 示例为文件路径为 .github/workflows/main.yml 的工作流程添加状态徽章。 仓库的 OWNER 为 github 组织,REPOSITORY 名称为 docs。

使用 branch 参数
此 Markdown 示例为名为 feature-1 的分支添加状态徽章。

使用 event 参数
This Markdown example adds a badge that displays the status of workflow runs triggered by the push event, which will show the status of the build for the current state of that branch.
