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

What is an environment, and which protection rules can it have?

BeginnerConceptSecrets, Variables, Environments & Permissions
Answer

A named deployment target (dev, staging, prod) with its own secrets, variables and protection rules:

  • Required reviewers: up to 6 users or teams, any one approval suffices; prevent self-review blocks the person who triggered the run.
  • Wait timer: 1 to 43,200 minutes delay before the job starts.
  • Deployment branches and tags: all, protected branches only, or selected patterns (main, v*).
  • Custom deployment protection rules: GitHub Apps that approve or reject (change windows, monitoring health, ticket checks).
  • Allow administrators to bypass toggle.

Protection rules on private repos require a paid plan.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, Variables, Environments & Permissions