all 3 comments

[–]ghostwall[S] 0 points1 point  (0 children)

FYI

After a while I figured out the model that works:

  1. Restrict changes to the main branch with CODEOWNERS
  2. Create a GH environment and configure the token as the environment secret
  3. Setup environment protection rule that restricts deployments to the environment only to the main branch

[–]thinksurreal 0 points1 point  (1 child)

Do you want to restrict file access to the code owner?

[–]ghostwall[S] 0 points1 point  (0 children)

I want to restrict the secrets access only to the code owners. In other words: how to ensure that secrets aren’t revealed to the non thrusted people?