Quick summary
GitHub Actions environment variables let you securely manage configuration data and secrets across your CI/CD workflows. By scoping variables to specific environments, teams can control deployments to branches and tags with fine-grained access.
Steps
- Navigate to your desired repository and click the Settings button.
- Select Environments from the repository settings sidebar.
- Click New environment to create a new deployment environment.
- Name your environment and click Configure environment to proceed.
- Add deployment rules by scoping the environment to specific branches and tags.
- Click Add environment secret to store a sensitive secret scoped to this environment.
- Click Add environment variables to define configuration variables used to manage data within your workflows.



