Currently, it appears that github actions causes a commit status to be generate only for each _job_ (expanded by the matrix, etc). This makes configuring things that consume commit status non-trivial (especially with larger matrices).
Consider the case were someone wants to ensure a workflow is completely executed before permiting a merge to a branch. Currently, github will list every single job within that workflow as selectable within it’s own branch protection UI. Every addition/removal of a job now has to have a corresponding edit to the branch protection. This does not just affect the branch protection UI: other github applications (for example, bors-ng) are designed to look for a particular set of commit status indicators to decide how they take action.
Not having a per-workflow status is also a bit strange given the default policy for workflows is to cancel other jobs if any job fails (ie:
jobs.\<job_id\>.continue-on-error: false). In other words: the default policy thinks of workflows as a unit where if anything fails the whole “result” would fail. It is unclear to me why this logical “result” is not published.
I’m considering if there are some workarounds here by taking advantage of job dependencies. If anyone has ideas for a workaround, do let me know.
Hi @codysch ,
It’s seems you’re looking for the check_suite status.
Please check the official doc here: https://help.github.com/en/actions/configuring-and-managing-workflows/managing-a-workflow-run
and check suite rest api doc here(status, conclusion): https://developer.github.com/v3/checks/suites/
Hi weide-zhou, thanks for replying here.
It appears the thing you’ve linked (“check suite status”) is a seperate API from commit status, meaning things that are designed to examine commit status (the vast majority) don’t receive this information.
This doesn’t even resolve the example I gave for github’s branch protection UI: github’s own branch protoection UI doesn’t allow specifying check suite status as a condition.
Even though it doesn’t resolve the issues this question raises, I took a deeper look at the current check-suite API. Ultimately, it does not expose per-workflow information. The
check-suites end point provides a list of
suites, which turn out to be applications in practice. For example, there is 1 entry for
github-actions as a whole, not 1 entry per workflow.
Here’s the text from one of your links that talks mentions this:
> A check suite is a collection of the check runs created by a single GitHub App for a specific commit.
check runs here correspond to github actions jobs.
Because of these issues, it does not appear that check suite status is a solution to this.
Hi @codysch ,
Thanks for your reply! In the branch protection UI, it’s by designed to use echo job status as a condition.
A workflow could have multiple jobs, if you set
jobs.\<job_id\>.continue-on-error: false, one of the job fail, the workflow will be marked as failed.
Workflow run api: https://developer.github.com/v3/actions/workflow-runs/#get-a-workflow-run
job run api: https://developer.github.com/v3/actions/workflow-jobs/
From the api result, you can find the workflow/job run ‘status/conclusion’ message.