GitHub Action Badges
If you want to show the GitHub Actions status badge for one of your workflow, be aware that the URL has to reflect the action.
An GitHub action configuration file located in:
.github/workflow/markdownlint.yml
Could be reflected in a badge with the URL:
![example workflow](https://github.com/jonasbn/til/actions/workflows/markdownlint.yml/badge.svg)
Like for example this badge for one of my repositories:
- The URL points to GitHub:
https://github.com
- My account:
jonasbn
- The relevant (this) repository:
til
- The workflows directory:
workflows
and this is theworkflows
directory located in the directory.github
, you do however have to addactions
before theworkflows
- Then add action configuration file:
markdownlint.yml
- And finally add the filename:
badge.svg
Complete example:
![example workflow](https://github.com/jonasbn/til/actions/workflows/markdownlint.yml/badge.svg)
If you then want to link the badge to the workflow, you can add the URL to the badge, like this:
[![example workflow](https://github.com/jonasbn/til/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/jonasbn/til/actions/workflows/markdownlint.yml)
and this should now be a clickable link.
Do yourself the favor of testing the URL to the image and to the resource you are linking to before making commits containing it, it took me several attempts to get right.
Thanks to the friendly supporter from GitHub who helped me out.
There are a multitude of options for badges, do checkout shields.io for more badges, because you need sti***ng badges.