Missing documentation on GitHub Actions badges

I see some GitHub repos and many other repos are already using the GitHub actions badges.

Example: 

https://github.com/actions/toolkit/workflows/Main%20workflow/badge.svg

is used in https://github.com/actions/toolkit’s readme.

However, I can’t find any official docs on that topic. It would be nice if it’s better documented.

4 Likes

There’s docs on it now here: https://help.github.com/en/articles/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

11 Likes

What is the best url pointed by the badge?

There is 

https://github.com/<username>/<repo>/commit/<sha>/checks

 but it seems that \<sha\> cannot be master which defects this usage.

2 Likes

What about private repos?

2 Likes

Hi @randy3k,

This is the closest I got for my repo:

https://github.com/4lejandrito/creepyface/actions?query=workflow%3ABuild+branch%3Amaster

It links to the actions view filtering by workflow name and branch.

This is the code I use in the README to show the badge:

[![Build](https://github.com/4lejandrito/creepyface/workflows/Build/badge.svg)](https://github.com/4lejandrito/creepyface/actions?query=workflow%3ABuild+branch%3Amaster) 

Edit: I just found out that this URL is not public, only registered users can view it. Unfortunately there seems to be nowhere to link from the badge for everyone to see.

Is there a GitHub Action up easily to add a new event type/status?
I would like to show a build number, they are generated in the workflow.

I included a “deployment” / “deployment_status” Badge and update it via the Action but the Badge doesn’t update

2 Likes

This link doesn’t point to documentation on badges any more, afaict. Maybe this is the right link now? https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge

6 Likes