I had a workflow that was always reporting failure state even though it was succeeding. The workflow name AND file name were both the same: build-release-containers. The file had the yml extension, though.
Once I changed the workflow name to something more natural, like “Build Releae Containers”, the badge began to properly show the success state.
Maybe a bug?