How to Add a Workflow Status Badge to the README in GitHub Actions
Each workflow exposes a badge at /actions/workflows/<file>/badge.svg that reflects its latest run status.
Embed the workflow badge image in your README, linking it to the workflow runs page. Append ?branch= or ?event= to scope the status it reports.
Steps
- Find the workflow file name (e.g.
ci.yml). - Embed
.../actions/workflows/ci.yml/badge.svgas an image. - Add
?branch=mainto report only the default branch status.
README Markdown
README.md
[](https://github.com/my-org/my-repo/actions/workflows/ci.yml)Gotchas
- The badge reflects the most recent run for the given filter, not a specific commit.
- Use
?event=pushor?event=scheduleto avoid PR runs skewing the badge.
Related guides
How to Restrict a Workflow to Specific Branches in GitHub ActionsLimit when a GitHub Actions workflow runs with an on.push.branches filter, including glob patterns and branch…
How to Add a Job Summary Table From Test Output in GitHub ActionsTurn raw test counts into a Markdown table on the GitHub Actions run page by parsing output in a step and app…