Required actions workflows from branch protections should only be required if run #13690
Replies: 52 comments 56 replies
|
Thanks @daltonv. I agree that this is not the ideal solution. I'll talk with the team that owns branch protection to give them your feedback. I'll also talk to the docs team to suggest some improvements for this article in the meantime. Thanks again for taking the time to leave feedback. |
|
This should be a generalized change as it affects users who don't use GitHub Actions, but instead have third party CI/CD integrations triggered via webhooks. The option should simply be |
|
See also the most active discussion in ye olde GitHub Community Forum on this topic: https://github.community/t/feature-request-conditional-required-checks/16761 |
|
See also https://github.community/t/feature-request-required-checks-conditioned-on-path/2042 |
|
Ran into it as well. Having something like this would also let us implement more straightforward skipping. For instance, I don't need to to spend the time running all our test, visual regressions, etc. on a PR from an internal bot that edits changelogs, but I absolutely want those to be required checks for us humans so we can use really helpful things like auto-merging, etc. |
|
Very much want this, we spend piles of cash on GitHub because of this shortcoming. |
|
+1. We have the same problem over at Keycloak: Multiple workflows / jobs are running for e.g. a simple typo in our documentation, or a bump in npm dependencies. Would be very nice to have better support than the dummy workflow approach. |
|
Running into similar problem when using conditional workflow via circle-ci. It should not be waiting infinitely if the workflow doesn't run at all |
|
+1, it's surprising that GitHub and disappointing that GitHub doesn't fully support a code first approach for the definition of requirements. The dummy workaround is hacky to say the least. |
|
+1 |
|
+1 |
|
this is a real pain. any update on this? @ethomson |
|
Hard not to see this as a cash grab, we've been asking for it for 3 years now, the only way to safely protect branches in this scenario is to run all checks always. |
|
Came here to add to the chorus of programmers asking for help with this sad trombone UX. |
|
I got the "dummy workflow workaround" working but it broke after about a week. I don't know if it was some internal Github change or if my setup is just fragile, but the whole situation is pretty disappointing nonetheless. |
|
We've actually used https://github.com/dorny/paths-filter to create conditional actions, based on paths, that still succeed in the end. Workflow runs, it decides if it needs to do the work, and then passes/fails based on the work. If it doesn't need to do the work, it skips the conditional job, and passes. |
|
I tried the path filter action approach, and it’s been incredibly frustrating. The configuration goes like this:
Initially, this seemed like a reasonable solution, but it completely breaks down when you have even a slightly complex setup with job dependencies. For example, my CI has a build phase and a test phase, where the test phase has a matrix of runtime arguments. All these test jobs with different matrix values are marked as "required checks to pass." The issue arises when the file changes aren’t related to this CI. In such cases, I need to skip the build and test phases. If I use To hack around this, you can’t rely on path filtering in the workflow or job scope. Instead, you have to move the path filtering logic into steps. You check the output of the path filter job as a global variable, and in every job, the first step checks this variable. If the job needs to be skipped, you force a pass in the step itself, not in the job’s This approach is far more complicated than it should be. Something as basic as skipping jobs based on file changes shouldn’t require this level of convoluted hacking. It’s frustrating and feels like an overengineered solution for what should be a straightforward problem. |
|
Hey, are any updates on this? Is the GitHub team planning to implement this feature? |
|
Since 2022, this glaring issue has remained unresolved and unimplemented. This is not a feature request; it’s a genuine problem. While I was initially pleased with the migration to GitHub, we’ve encountered numerous frustrating obstacles that defy explanation. This issue is one of them. Others include the lack of support for proper required reviews (such as supporting only OR in codeowners files, extremely limited path filters. |
Agreed requiring a workflow that never runs due to path filtering is counterproductive. GitHub should make required checks conditional on whether the workflow actually triggers, instead of forcing dummy workflows that clutter the Actions list. |
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
This comment was marked as spam.
This comment was marked as spam.
|
This is going to be a serious issue for us trying to migrate from Azure DevOps to GitHub. We have several monorepos in ADO with various pipelines that are triggered or not based on what files changed (via build validation policies) and without the ability for github to only care about the checks that are relevant we'll have to implement a lot of hacky shit to make it work, or more likely just not migrate. |
|
It's sad to see GitHub give so little about it's users and leaving us completely in the dark. This has been a basic feature in Azure DevOps since 2017. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
Well I guess this thread is getting locked - thanks for that, spammers. For the record this is a feature I almost do not comprehend is missing and is routinely one of the reasons I look at moving us away from GH Actions to an external CI/CD provider. |


Uh oh!
There was an error while loading. Please reload this page.
If you have branch protections set so that a GitHub Action workflow must be run and pass before you can merge, and this workflow has path filtering in the
on:clause then you sometimes can't ever merge because the workflow doesn't run.This GitHub docs talk about this issue here: https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
There is a workaround suggested in the doc article, but it involves making a "dummy" workflow of the same name of the required workflow. This dummy workflow always passes and is triggered by the inverse path filtering of the required workflow.
This isn't the best solution in my mind because:
Instead it should be changed so local workflows are only required if they run in the first place.
All reactions