GitHub操作的官方徽章 [英] Official badge for GitHub actions

查看:61
本文介绍了GitHub操作的官方徽章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GitHub的新动作"功能是否有正式的徽章"?

我在他们的官方仓库中遇到了

请注意,我已将 {github_id} 替换为我的 username ,将 {repository} 替换为我的仓库名称和 {workflow_name}和相应的工作流程名称(删除花括号).还有其他人遇到这个问题吗?
我正在做一个私人仓库,以防万一.

解决方案

事实证明,徽章更新/渲染是一个缓慢的过程.将徽章添加到我的 README.md 后,我刚开始在另一个分支工作.大约10分钟后(至少在我的情况下),徽章出现了,但管道状态显示为未知".大约10分钟后,它又以正确的管道状态(在我的情况下为通过")再次更新.

因此,一旦完成,就继续处理其他内容,它将在某个时候自行更新.希望这对某人有帮助!

Does GitHub have an official 'badge' for their new 'actions' feature?

I came across this request on their official repo and there seems to be an official one:

https://github.com/{github_id}/{repository}/workflows/{workflow_name}/badge.svg

as per this comment, but I am unable to get it to work. Is it actually working? When I use it, I get the below output:

Note that I have replaced {github_id} with my username, {repository} with my repo name and {workflow_name} with the corresponding workflow name (removing the curly braces). Does anyone else have this issue?
Edit: I am working on a private repo, in case it makes a difference.

解决方案

As it turns out, badge update/rendering is a slow process. After adding the badge to my README.md, I just started off with work in another branch. After about 10 minutes (at least in my case), the badge appeared but the pipeline status was shown as 'unknown'. It updated again after about 10 minutes and with the correct pipeline status ('passing' in my case).

So, once you are done, just continue with your other stuff and it will update on its own, in sometime. Hope this helps someone!

这篇关于GitHub操作的官方徽章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆