Adding GitHub action workflow status badge to your repository

In the previous tutorials, I wrote about how to add GitHub actions to your projects. Now we are going to add a status badge to our GitHub repo README.md. You can have a badge for each of your GitHub Actions CI workflows. The first step is to set up a GitHub workflow. Example code.

← It would look like this badge

You need to add below snippet to your README.md. Change names for you Project:

[![YourActionName Actions Status](https://github.com/{userName}/{repoName}/workflows/{workflowName}/badge.svg)](https://github.com/{userName}/{repoName}/actions)

And push your code changes. Once the PR is merged, you will see the badge in your repo’s README.md

Example:

[![Android-master Actions Status](https://github.com/AndreSand/BornInApp/workflows/android-master/badge.svg)](https://github.com/AndreSand/BornInApp/actions)

Second workflow:

[![Android-master Actions Status](https://github.com/AndreSand/BornInApp/workflows/android/badge.svg)](https://github.com/AndreSand/BornInApp/actions)

Remember to you use the workflow name in the above URL, “is not the .yml file name” is the name you configured inside the .yml file. It took me some hours to figure this out. TIL I have to name the file and the GitHub actions name configuration the same.

Thanks for spending your time reading it and let me know if I’m wrong somewhere or if there’s something that could do differently or better. I’m open to your feedback 🙌🏻

-Andres

software engineer, read, swim, travel. apps: https://goo.gl/rDuuQw https://goo.gl/15GvfE

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store