In a github repository settings, what is difference between environments vs secrets

Viewed 41

In a GitHub repository setting, there is an "Environments" tab and a "Secrets" tab. What is the difference between these 2 tabs?

1 Answers

I assume that you mean the difference between Repository secrets and Environment secrets.

Repository secrets are simple secrets that you can create giving a name and value and then access it in your action.
Environment secrets give you more options on what job or branch can access a environment and its secrets. A workflow job cannot access environment secrets until the required reviewers approve.
Here an image of the possible configurations and the docs.

Environment secrets configuration

Related