I am trying to find a way by which i can disable github actions on a set of branches,(and not by adding if conditions in the workflow files, which can be edited by a developer.)
We have a github repo on which we do manage the environments using infra structure as code. We allow developers to raise PR from different branches to the main, which is a protected branch.
Since workflows can be modified and ran against any branch by a developer, the system can be now miss used to deploy without the PR itself.
Wonder are there anyway i can disable workflows, through settings, and allow only protected branches to be enabled for workflows.
Looking for opinion, if anyone had similar problems, and how did they handle this situation.