GitHub actions is one of the latest additions in the sphere of tools, available for CI/CD. It’s quite powerful and integrates directly with the GitHub repository where it’s ran.
One of the benefits of having a CI system, is the ability to quickly understand if your latest build is passing or not. The so called “status badges” help with this, especially for Open Source projects.
Showing such a status badge image in your own repository is quite easy.
You just need to collect 3 pieces of information:
Based on these 3 things, you can construct a URL to an image that’s automatically generated by GitHub actions and represents the latest build status:
https://github.com/<OWNER>/<REPOSITORY>/workflows/<WORKFLOW_FILE_PATH>/badge.svg
To use it inside a repository’s README.md:
![Build passing](https://github.com/<OWNER>/<REPOSITORY>/workflows/<WORKFLOW_FILE_PATH>/badge.svg)