Secrets for nominated branch

I can set secrets at Org or repo level, but it is global for all branches.

Can I have a feature to set it only for nominated branch (such as master/main branch only)?

for example, I can set this in travis-ci.

image

Hi @ozbillwang :wave:

I believe what you’re asking for is support for Environments, see these:

  1. Implementing least privilege for secrets in GitHub Actions | The GitHub Blog
  2. GitHub Actions: Environments, environment protection rules and environment secrets (beta) | GitHub Changelog
  3. Environments - GitHub Docs

Specifically (1) is what you’re after.

Goodluck!