At which levels can secrets be defined in GitHub for use in Actions?
Select an answer to reveal the explanation.
Short Explanation and Infographic
GitHub secrets follow a hierarchy: enterprise > organization > environment > repository — each level can override or supplement the next.
Full explanation below image
Full Explanation
GitHub supports secrets at four levels: (1) Repository secrets — available to all workflows in that repo; (2) Environment secrets — only available when a job targets that specific environment; (3) Organization secrets — can be shared across multiple repositories based on access policy; (4) Enterprise secrets — available across the enterprise. When secrets at different levels share a name, the more specific level wins: environment > repository > organization > enterprise. Environment secrets are particularly powerful because they're only accessible when the deployment environment's protection rules are met.