Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EB Environment Variables from Github Secrets #81

Open
chronos-ohm opened this issue Apr 13, 2022 · 6 comments
Open

EB Environment Variables from Github Secrets #81

chronos-ohm opened this issue Apr 13, 2022 · 6 comments

Comments

@chronos-ohm
Copy link

chronos-ohm commented Apr 13, 2022

Any way to pass environment variables to EB through just setting up the secrets on Github and defining them in the workflow yml, just like the AWS secrets are set?

Would be better if all the secrets were contained in one place.

@moon-sam
Copy link

I agree that they would be nice to have in one place, but one argument against that is there's no reason for github to ever know these secrets, since they aren't needed for deploy. They can be configured permanently in the AWS Beanstalk environment.

@nilansaha
Copy link

nilansaha commented May 31, 2022

@moon-sam The secrets a pretty safe in Github for one and setting secrets in Github is a much easier job than setting them in AWS Beanstalk imo. I think this would be a great feature if added. Any plans for this @einaregilsson

@jleguina
Copy link

jleguina commented Feb 1, 2023

@einaregilsson Any updates on this? Cheers

@gbhand
Copy link

gbhand commented Mar 24, 2023

Sadly Einar is no longer with us #93 (comment) but @gzur has taken over maintaining the repo and is still actively reviewing PRs as they come in.

Environment variables could be set in this action in the UpdateEnvironment API call by adding environment variables to the OptionSettings request parameter.

Environment variables can also be set by including an .ebextensions config file with placeholder values filled in by GitHub Actions. Additionally for applications on the Docker platform you can override all environment variables by including a .env file in your application package.

@ameya-shahu
Copy link

Hi @gbhand , Could you please provide me some sample script?

@vitalykarasik
Copy link

I'm generating my '.env' from GitHub secret as simple as

echo '${{ secrets.ENV_FILE }}' > .env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants