GitHub操作徽章未显示状态。

5
我在我的repo上多次运行了Github actions,没有问题,在其中一个repo上使用相同的脚本时显示“无状态”。 该repo为:https://github.com/aurelpere/python-planif 我不明白为什么它没有显示状态,因为workflow正确运行... 任何帮助都会很棒,谢谢。
请注意,我的svg徽章也显示“无状态”:https://github.com/aurelpere/python-planif/workflows/CI/badge.svghttps://github.com/aurelpere/python-planif/workflows/Unittests/badge.svg。 (参考此帖子:https://github.community/t/badge-shows-no-status-and-no-status-mismatch-between-the-filepath-vs-name-usage/16907或此帖子Github Actions badge shows "No status"
我还尝试在另一个新的repo中复制代码(https://github.com/aurelpere/python-geothermal---power-to-gas/),情况相同,徽章显示无状态,所以与此处的快速合并问题无关https://github.community/t/workflow-badge-no-status/17280/2 编辑:根据下面的答案解决了问题,但我删除了最初的repo,只保留了新的repo,如果您尝试跟随链接。

1
同样的问题,如果你解决了,请更新我们。 - Pablo Gonzalez
1
我解决了这个问题,请在这里查看。 - sunnamed
这个回答解决了你的问题吗?GitHub CI 徽章显示“无状态” - davidhcefx
谢谢,下面的解决方案对我有用。 - user18502650
1个回答

2

由于某些原因,您必须使用工作流名称而不是YAML文件名。这对我起作用了。

<a href="https://github.com/pgonzaleznetwork/forcemula/actions/workflows/nodejs.yaml">
    <img src="https://github.com/pgonzaleznetwork/forcemula/workflows/Tests/badge.svg?style=flat" />
</a>

奇怪的是,我尝试使用工作流名称,但我的直接进入了工作流页面,完全忽略了“/badge.svn”部分。 - kerzek
但它是否显示实际状态?这是这个线程的主要问题。 - Pablo Gonzalez

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接