Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xgqfrms/dd437e3bc7bd5d75580279080d3021f0 to your computer and use it in GitHub Desktop.
Save xgqfrms/dd437e3bc7bd5d75580279080d3021f0 to your computer and use it in GitHub Desktop.
GitHub Actions Status & workflows SVG badge

GitHub Actions Status & workflows SVG badge

After actual verification, I came up with the following solutions

solution 1: you can use the name of your workflow .yml file.

https://github.com/{username}/{repository}/workflows/{your_`.yml`_file_name}/badge.svg

demo

https://github.com/xgqfrms/ChatGPT/blob/main/.github/workflows/gp-pages.yml#L3

enter image description here

CI is the workflows file name

https://github.com/xgqfrms/chatgpt/workflows/CI/badge.svg

enter image description here

solution 2: follow the GitHub docs

2.1 automatically created

demo

[![GitHub Actions Testing ✅](https://github.com/xgqfrms/cdn/actions/workflows/testing.yml/badge.svg)](https://github.com/xgqfrms/cdn/actions/workflows/testing.yml)

https://github.com/xgqfrms/cdn/actions/workflows/testing.yml

enter image description here

enter image description here

2.2 manually created

https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE>/badge.svg

https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge

demo

https://github.com/xgqfrms/cdn/blob/gh-pages/.github/workflows/testing.yml#L1

enter image description here

testing.yml has .yml in its name.

https://github.com/xgqfrms/cdn/actions/workflows/testing.yml/badge.svg

enter image description here

refs

xgqfrms/xgqfrms#26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment