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

  1. Open the Actions tab in your GitHub repository.
  2. Select the workflow you want to badge.
  3. Click Create status badge (under More or directly on the workflow page).

The image shows a GitHub interface with a pop-up window for creating a status badge. It includes options to select a branch and filter branches, with a "Copy status badge Markdown" button at the bottom.

  1. In the pop-up, choose your target branch (e.g., main or develop) and any event filters.
  2. Click Copy status badge Markdown to grab the snippet.

Badge Markdown Breakdown

ComponentDescriptionExample
Alt textAccessible name for the badge imageVault Demo
Image URLWorkflow badge SVGhttps://github.com/<OWNER>/<REPO>/actions/workflows/vault-demo.yml/badge.svg
Link URLLinks to workflow run historyhttps://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:

[![Vault Demo](https://github.com/sidd-harth-7/actions-1/actions/workflows/vault-demo.yml/badge.svg)](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.

Watch Video

Watch video content

Practice Lab

Practice lab

Previous
Securing Secrets using HashiCorp Vault