GitHub Actions and environment variables #192951
-
🏷️ Discussion TypeQuestion 💬 Feature/Topic AreaARC (Actions Runner Controller) Discussion DetailsI'm working with multiple environments (dev, staging, production) across several repos in a free organization. I know about environment-level secrets, but I'm running into a situation where I have to manually recreate the same environment configs for every single repository, which gets tedious fast. Is there a recommended way to manage environment-specific variables and secrets more efficiently without duplicating them everywhere? I've seen some people mention reusable workflows but I'm not sure if that actually solves the secret-sharing part or just the workflow logic part. Would love to know how others are structuring this, especially teams managing more than 5-10 repos. Any patterns or tools that have worked well for you? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Great question and something a lot of teams run into once they scale past a handful of repos! |
Beta Was this translation helpful? Give feedback.
Great question and something a lot of teams run into once they scale past a handful of repos!
So to clear up the reusable workflows part first, you're right that they solve the workflow logic duplication, but they don't magically share secrets for you. The secrets still need to exist in each repo or be explicitly passed into the reusable workflow using the secrets: inherit keyword, which at least reduces some of the manual wiring.
For actually managing environment configs across many repos without duplicating everything, the approach that works best really depends on whether your repos are public or private. If they're public, org-level secrets with environment scoping gets you pretty far…