Interview Prep/GitHub Actions/Secrets, Variables, Environments & Permissions

How do you restrict who can approve production deploys and stop someone approving their own change?

IntermediateConceptSecrets, Variables, Environments & Permissions
Answer

Set the prod environment's required reviewers to a team (platform-oncall), enable prevent self-review, restrict deployment branches to main and release tags, and disable admin bypass. Combine with branch protection on main (required reviews, CODEOWNERS on .github/workflows/) so the person cannot change the workflow to remove the environment line without review.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, Variables, Environments & Permissions