Is it possible to require all GitHub Actions tasks to pass without enumerating them?

The Question

Is it possible to configure required status checks in a repo to say “all GitHub Actions tasks must pass”, instead of needing to select individual GitHub Actions tasks by name?

This is how Travis, CircleCI, AppVeyor, and Azure DevOps integrations with GitHub all work…the default behavior is that all tasks must pass, and you can selectively mark tasks as optional.

I’d like to be able to have an administrator set this one time and not have to change it every time we change our GitHub Actions flow.

Background Context

Consider the screenshot below:

This is taken from a pull request in a project I’m working on. The master branch of that repository has a GitHub Actions workflow with 4 tasks. A repo administrator has manually marked each of them as required, following the steps in “About required status checks”. You can see, for example, that a task r-package (macOS-latest, clang) is required.

The pull request I’m proposing changes that GitHub Actions workflow, such that there is no longer a task called r-package (macOS-latest, clang). I am now in a situation where the pull request can’t be merged by maintainers because it looks like the required tasks never ran, and there a bunch of new non-required tasks that passed. See https://github.com/microsoft/LightGBM/pull/3065#issuecomment-642887012 for more background.

Thanks for the time and consideration!

Unfortunately there isn’t a way to do this. I’ve had this issue in the past as well where I had a path exclusion filter set up to not run build workflows on non-code changes and they similarly blocked merges. I had to end up doing this as a workaround.

1 Like

oh sad. Yeah I guess it is just something we’ll have to deal with. Not a big deal! Overall I’m still really liking GitHub Actions.

Thanks for the help.

1 Like

@jameslamb I think another work around would be to create a job that “needs” the previous job:

jobs:
    test:
        matrix: ...
    allgood:
        needs: [test]

https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds

but it costs an extra worker

oooo cool idea! That’s very clever, I like it. I think that would solve what I’m looking for, thank you.