Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

385
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda