I’m using the classical configuration:
name: … on: [push, pull\_request] # …
When a PR is made, this always run both strategies (obvious), but I don’t want that.
What I want is:
as long as there’s not PR, I want to run the build on every push or force-push (for every branch)
once there’s a PR (
pull_request) I don’t need
Maybe… do I even need
pull_request in this scenario?
Basically on every push or force-push, no matter where to (a branch with or without PR) I want the build to run.
This matters for cases where no dedicated PR is needed in branch but I still want to “see” that the tests for this branches are green before merging manually. Or I just want to trigger a test suit run with an idea of a modification.
Maybe I’m overthinking things, not sure. Or I don’t get the proper distinction between them. I looked at https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#on but can’t derive a clear answer.
It sounds similar to https://github.community/t5/GitHub-Actions/How-to-trigger-an-action-on-push-or-pull-request-but-not-both/m-p/35805 which doesn’t have a satisfiying answer.