Action Badges either wrong or missing

I have dabbled in GitHub Actions and using Badges for one of my repos. I have three workflows running fine on the master branch (nothing else is currently important to me). I used this documentation to configure badges. However, the badges referenced from the README.md show various errors:

* the badge for “main.yml” shows the build to be failing, which according to the Actions page it isn’t.

* the badge for “platformio.yml” and “wintest.yml” are missing altogether. Calling their URLs directly gives a “not found”.

I have searched the forum and found the following:

* https://github.community/t5/GitHub-Actions/Badge-is-always-showing-quot-failing-quot/td-p/34807 - I adjusted the URLs accordingly, but results remain the same (although potentially for different reasons).

* https://github.community/t5/GitHub-Actions/GitHub-Actions-badge-quot-Not-Found-quot/m-p/32200 - This seems to match some of my problems, but the mentined causes don’t seem to apply to my repo (or I’m just blind).

@deltaphi ,

In the README.md of your repository, I notice you are using the YAML file paths as reference in the URLs of the Status badges, instead of the workflow names.

## CI Status

* Linux Unittest Build
![](https://github.com/deltaphi/RR32CanController/workflows/.github/workflows/main.yml/badge.svg?event=push)

* Embedded Build
![](https://github.com/deltaphi/RR32CanController/workflows/.github/workflows/platformio.yml/badge.svg?event=push)

* Windows Unittest Build
![](https://github.com/deltaphi/RR32CanController/workflows/.github/workflows/wintest.yml/badge.svg?event=push)

According to the description in the docs:

If your workflow uses the name keyword, you must reference the workflow by name.

Note: Referencing the workflow file using the file path does not work if the workflow has a name.

You have set names for all the three workflows, so you should use workflow names, instead of the file paths.

## CI Status

* Linux Unittest Build
![CI](https://github.com/deltaphi/RR32CanController/workflows/CI/badge.svg?event=push)

* Embedded Build
![PlatformIO CI](https://github.com/deltaphi/RR32CanController/workflows/PlatformIO%20CI/badge.svg?event=push)

* Windows Unittest Build
![Windows CI](https://github.com/deltaphi/RR32CanController/workflows/Windows%20CI/badge.svg?event=push)

Actually, you can easily get the latest right Status badge for each workflow from the Actions tab.

@brightranThank you very much! So it turns out it really was my oversight.

If I may offer up a suggestion for improvmement: The picture you drew should be added to the documentation. Besides being a great explanaiton, it also nicely draws the eye to the fact that you don’t have to compose the URL by yourself but can just take it from the Action page.

@deltaphi ,

If I may offer up a suggestion for improvmement: The picture you drew should be added to the documentation. Besides being a great explanaiton, it also nicely draws the eye to the fact that you don’t have to compose the URL by yourself but can just take it from the Action page.

I agree. The " Create status badge" button is a good thing that can let users avoid manually composing the URLs and making mistakes. But I notice that this button is never mentioned in the docs. I have report an internal suggestion about this to the appropriate engineering team.

And you also can directly report your suggestions here. That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.