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.
If you're a registered member of the GitHub Developer Program, building an app with the GitHub API, you'll get a Developer Program Member badge on your profile. For more information on the GitHub Developer Program, see GitHub Developer. If you use GitHub Pro you'll get a PRO badge on your profile.
GitHub Badges can boost the readability of the GitHub repositories because they provide users with a fast way to capture repository metrics. Badges are supposed to be embedded in your README.md which elucidates the importance and necessity of your project to other developers.
You can get the actions badge by navigating to the required workflow on your repo on GitHub.com and clicking on the Create status badge button.
Here, you can select the badge for the required branch and event and use the generated markdown.
For eg, below is the badge that I generated for master branch for push event of the CI workflow:
The markdown for the above badge:
![CI](https://github.com/kratostaine/spring-authorization-server/workflows/CI/badge.svg?branch=master&event=push)
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With