Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

380
Views
Creating GitHub readme build status badge, based on commit build status?

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:

[![GitHub branches](https://badgen.net/github/branches/Naereen/Strapdown.js)](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:

![example branch parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?branch=main)

Which returns: enter image description here

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!