Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Secrets scoped to branches

We're thinking of setting up staging vs. production deploys in GitHub Actions from `master` vs. `develop` branches. Each deployment environment needs different secrets.

 

I know it's possible to add multiple secrets to the repo and write workflow code to pick the correct secrets based on the current branch. But it would be really nice if GitHub Actions supported scoping secrets to specific branches. (@N-Usha from @AzureDevOps says this is a "much needed feature".)

 

I have submitted feedback for to request this feature. Any hints of about if it is on the roadmap?

 

Maybe implementing this can help address some of the security concerns around secrets:
https://github.community/t5/GitHub-Actions/Support-for-Protected-Secrets/m-p/44007

https://github.community/t5/GitHub-Actions/hiding-secrets-from-actions-triggered-by-branches/m-p/460...

https://github.community/t5/GitHub-Actions/Limit-secrets-to-specific-branches/m-p/55633

https://github.community/t5/GitHub-Actions/How-to-prevent-repository-collaborators-from-triggering-w...

https://github.community/t5/GitHub-Actions/Question-on-actions-security/m-p/35028

1 Reply
Highlighted
GitHub Partner
Message 2 of 2

Re: Secrets scoped to branches

Hi @dcecile , 

I have seen this request in our internal channel, but the priority of it is not very high in current. So i am afraid that it could not be carried out in a short time.