Workflow files can filter on branches, but at the same time they *live* in a branch, so if the repo has different workflow files in different branches do they all get selected or only one / some? And if the latter, which one is it, the “default branch” or some other?
By coincidence I had a similar question yesterday.
It reads the files from the target branch (either a push or a pull request) and from experimentation, if the target branch does not have a workflow file, it won’t run.
OK, so github just runs the workflow file it finds in the commit (hopefully after merging for PRs) and e.g. won’t run anything if the PR just removes the workflow file or something.