GitHub Actions
Security Guide
Adding a workflow status badge
A workflow status badge provides a quick visual indicator of your GitHub Actions workflow’s current state. Embedding this badge in your repository’s README.md
(or any documentation page) helps contributors and visitors instantly see if your CI/CD pipelines are passing or failing.
Benefits of Workflow Badges
- Improves transparency on build health
- Boosts contributor confidence
- Encourages proactive maintenance
Note
Badges are dynamic images that update automatically each time your workflow runs. You can filter by branch or event to display the status you care about.
Steps to Generate a Status Badge
- Open the Actions tab in your GitHub repository.
- Select the workflow you want to badge.
- Click Create status badge (under More or directly on the workflow page).
- In the pop-up, choose your target branch (e.g.,
main
ordevelop
) and any event filters. - Click Copy status badge Markdown to grab the snippet.
Badge Markdown Breakdown
Component | Description | Example |
---|---|---|
Alt text | Accessible name for the badge image | Vault Demo |
Image URL | Workflow badge SVG | https://github.com/<OWNER>/<REPO>/actions/workflows/vault-demo.yml/badge.svg |
Link URL | Links to workflow run history | https://github.com/<OWNER>/<REPO>/actions/workflows/vault-demo.yml |
Embedding the Badge in Your README
Paste the copied snippet at the top of your README.md
:
[](https://github.com/sidd-harth-7/actions-1/actions/workflows/vault-demo.yml)
Repeat for additional workflows (for example, Exploring Variables and Secrets).
Warning
Too many badges can clutter your README. Group or reorder them logically to maintain readability.
Commit and Push
Commit your updates and push them to GitHub. To skip CI on this commit, include [skip ci]
:
git add README.md
git commit -m "docs: add workflow status badges [skip ci]"
git push
After pushing, visit your repository’s main page. The status badges will appear at the top of your README, reflecting real-time workflow results.
Links and References
Watch Video
Watch video content
Practice Lab
Practice lab