Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

389
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda