What is a custom deployment protection rule?
AdvancedConceptSecrets, Variables, Environments & Permissions
Answer
A GitHub App, enabled on an environment, that receives a deployment_protection_rule webhook when a job targets the environment and calls back with approve or reject. Use cases: block deploys outside change windows, require a ServiceNow change ticket, check Datadog for active incidents, or require a successful canary in staging. Several vendors ship ready-made apps; you can write your own. The job waits (without consuming minutes) until every rule approves.
More on Secrets, Variables, Environments & Permissions
Where can secrets be defined, and what is the precedence?BeginnerHow are secrets protected in transit and in logs, and what are the limits?IntermediateAre secrets available to every step automatically?BeginnerWhy is it a bad idea to store structured data like JSON or a whole `.env` file as one secret?IntermediateWhat is an environment, and which protection rules can it have?BeginnerWhen does a job wait for environment approval, and what does the reviewer see?Intermediate