Seems like Github already have a badge at
https://github.com/<user>/<repo>/workflows/<workflow name>/badge.svg
https://github.com/actions/toolkit/workflows/Main%20workflow/badge.svg
But as we know, our badges are better :P
Yep, let's do it!
Here are the docs: https://help.github.com/en/articles/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
Special note:
Badges display the status of your default branch (usually
master).
As far as I can tell, there is no way to specify a particular branch.
I guess we could look up in api docs
https://developer.github.com/v4/
https://developer.github.com/v3/
But I didn't found anything for new actions/workflows
Just found that it's available through the CheckRuns api.
ProTip: use conclusion for state, not status.
https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref
I think we should include support inside the /status endpoint.
Most helpful comment
Just found that it's available through the CheckRuns api.
ProTip: use
conclusionfor state, notstatus.https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref
I think we should include support inside the
/statusendpoint.