Is there anything similar to a CircleCI context that I can use in a GitHub workflow to pass a large group of environment variables to an action or job step? The goal would be to avoid creating hundreds of secrets in the UI, then needing to redefine them all in the parameters block of the workflow step or action. I haven’t found a way around this yet after a lot of searching. Is there a decent solution I may have missed?
Github action supports encrpted secrets in organization/repo level setting, and can be used as workflow, job and step level environment value in the yaml file.
But it’s NOT supported to define environment variables(secrets) in a group and add into workflow yaml, you need to add env variable one by one for the workflow.
If you’d like the feature, you can raise a feature request in below link where github product manager will take a review: https://support.github.com/contact/feedback?contact[category]=actions
For const env value, you can create a script(eg: *.sh), use set-env command to set all env variables. Not ideal but can save a lot of time and avoid repeating.