If you want to show the GitHub Actions badge on your repository, be aware that the URL has to reflect the name of a given action.
Do note GitHub actions are still in beta.
Like for example this badge for one of my repositories:
- The URL points to GitHub:
- My account:
- The relevant (this) repository:
- The workflows directory:
workflowsand this is the
workflowsdirectory located in the directory
- Now the most tricky part - the
namefields from the
main.ymlfile from the above directory (
name: Markdownlint Workflow on: push jobs: build: name: Markdownlint runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: ./github-action-markdownlint
name: Markdownlint Workflow
Okay, but since the specified name contains spaces, the have to be explicitly described using URI-encoding (or percent-encoding), meaning space is encoded
- Last but not least the hard-coded value:
So the complete URL for the badge displayes look as follows:
Do yourself the favor of testing the URL before making commits containing it, it took me several attempts to get right.
Thanks to the nice supporter from GitHub who helped me out.
- Wikipedia: URI-encoding
- GitHub: "Setting up continuous integration using GitHub Actions"
- GitHub: "Adding a workflow status badge to your repository"