Context
I would like to eliminate the manual exporting of build status badges that my CI does to GitHub. To do this, I intend to create/use a build status badge in the README.md
of repo repo_a
, that reflects the build status of the head commit head_commit_c
of branch branch_b
status of the head of a branch. This build status of head_commit_c
is already set by my self-hosted CI, so I hope I won't also have to output the build status badge (anymore).
Question
(How) can one set a build status badge in a README.md
of a GitHub repository repo_a
with branch branch_b
based on the latest(HEAD) commit commit_c
of that branch?
Related example
In this repository I saw that some markdown badges contain a .js
. I assumed this is somehow able to retrieve some property of a GitHub repository, for example the amount of stars:
[](https://github.com/Naereen/Strapdown.js/)
So I thought there might be a related .js
file that parses the latest GitHub commit status and converts it into an .svg
/badge.
Attempt I
Based on the documentation linked in the comments, I tried:

I think this is because it refers to a workflow file which does not exist in this case, as I run my own CI.
So if this workflow file named main.yml
can directly link the build status result of a branch, to the latest commit status in that branch, I imagine one could add such a workflow file. I did not yet determine whether this indeed is the case, and if yes, how.
Note
So I do not mean a link that parses the url of a specific commit, but an automatically updated link to the latest commit build status.