Quick question about GitHub Actions and secrets. #192949
-
🏷️ Discussion TypeQuestion 💬 Feature/Topic AreaOther Discussion DetailsHey everyone :D Quick question about GitHub Actions and secrets. I’m using a free organization and currently have to define the same repository secrets separately for each repo, which is a bit annoying. Is there a way to share secrets across multiple repositories (like organization-level secrets) on a free plan? Or is this only available under certain conditions? Would love to hear how you’re handling this |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Hey Szymon! yeah this is a pretty common pain point. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, thanks for clarifying --yeah, I kind of expected that answer too 😅 Unfortunately all my repositories are private, so that pretty much rules out using organization-level secrets on the free plan. Another downside I’ve run into is with GitHub Packages - from what I can see, access to organization-level packages is also limited, which makes things even more inconvenient when trying to share artifacts between services. So at this point it feels like the only real options are either duplicating secrets per repo or introducing an external solution like a secrets manager, which adds extra complexity. Not the most ideal setup, but I guess that’s where things stand for now. Thanks for the explanation anyway, appreciate it! |
Beta Was this translation helpful? Give feedback.
-
|
Yes — you can share secrets across multiple repositories using organization-level secrets, even on a free plan, but with some limitations. In GitHub, organization secrets are supported for GitHub Actions, and you can configure their access scope as: All repositories 👉 However, the key limitation is: On a free plan, organization secrets are mainly available for public repositories If your free plan doesn’t allow it for private repos: ❌ You must define secrets per repository (default way) |
Beta Was this translation helpful? Give feedback.
Hey Szymon! yeah this is a pretty common pain point.
So organization-level secrets do exist in GitHub Actions, but here's the catch, on a free organization plan, they only work with public repositories. If your repos are private, you'd need to upgrade to GitHub Team or Enterprise to use org-level secrets across them.
If your repos are public though, you can go to your org settings, head over to Secrets and Variables under Actions, and define secrets there. You can then control which repos have access to them, either all repos or specific ones you choose.
For folks stuck on the free plan with private repos, the workarounds people usually go with are things like using a shared .env file sto…