r/devops • u/pneteng • Jun 04 '26
Architecture GitHub - protect Actions yml file from devs
Quick background: we are using Azure DevOps, but migrating to GitHub enterprise for both code repos and deployments. In DevOps all files related to the deployment pipeline are located in the same project, but separate repo. This allows me to control who can modify pipeline files and developers are excluded.
I am having issues achieving the same in GitHub with Actions. There is a .github folder in the repo that I would like to protect. I tried using CODEOWNERS with rules and branch policies. It works, but not as clean as in DevOps. I would like to avoid requiring pull requests for any commit, which is so far the only way I was able to achieve what I want.
Please share how you designed this in your setup.
View all comments
Show parent comment
1
u/klipseracer Jun 07 '26
Just to add to this, code owners isn't the only way to do things now. There is a new ruleset section specifically for doing this on a more granular level and if you terraform your repositories and configurations, I suspect this will be easier than committing a file and merging it.
I have not used this yet but have been eyeballing it since it seems to offer more options for defining more than one team to approve.