Skip to main content

Adding a workflow status badge

You can display a status badge in your repository to indicate the status of your workflows.

Note: Workflow badges in a private repository are not accessible externally, so you won't be able to embed them or link to them from an external site.

Um selo de status mostra se um fluxo de trabalho está falhando ou passando. Um local comum para adicionar uma notificação de status é no arquivo README.md do repositório, mas você pode adicioná-lo a qualquer página da Web desejada. Por padrão, os selos exibem o status do seu branch-padrão. Você também pode exibir o status de uma execução de fluxo de trabalho para um branch ou um evento específico usando os parâmetros de consulta branch e event na URL.

Captura de tela de um selo de status de fluxo de trabalho. O lado esquerdo contém o logotipo octocat e "Demonstração do GitHub Actions", o nome do fluxo de trabalho. A metade da direita está verde com o texto "passando".

To add a workflow status badge to your README.md file, first find the URL for the status badge you would like to display. Then you can use Markdown to display the badge as an image in your README.md file. For more information about image markup in Markdown, see "Sintaxe básica de gravação e formatação no GitHub."

Using the workflow file name

You can build the URL for a workflow status badge using the name of the workflow file:

https://github.com/OWNER/REPOSITORY/actions/workflows/WORKFLOW-FILE/badge.svg

To display the workflow status badge in your README.md file, use the Markdown markup for embedding images. For more information about image markup in Markdown, see "Sintaxe básica de gravação e formatação no GitHub."

For example, add the following Markdown to your README.md file to add a status badge for a workflow with the file path .github/workflows/main.yml. The OWNER of the repository is the github organization and the REPOSITORY name is docs.

![example workflow](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)

Using the branch parameter

To display the status of a workflow run for a specific branch, add ?branch=BRANCH-NAME to the end of the status badge URL.

For example, add the following Markdown to your README.md file to display a status badge for a branch with the name feature-1.

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

Using the event parameter

To display the status of workflow runs triggered by the push event, add ?event=push to the end of the status badge URL.

For example, add the following Markdown to your README.md file to display a badge with the status of workflow runs triggered by the push event, which will show the status of the build for the current state of that branch.

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