Problem in Enviromental Variables
See original GitHub issueI have a lot of enivormental variables that I need to push to heroku.
I have stored all these variables in an encrypted .env.gpg
file which I am later decrypting in one of the steps and put it in the folder where the heroku action will take place.
I need to pass this decrypted .env
file to heroku.
How can I do this?
name: Frontend Deploy
on:
push:
branches:
- autodeploy
jobs:
deploytoheroku:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Decrypt frontend.env
run: ./.github/scripts/frontend_decrypt.sh
- uses: akhileshns/heroku-deploy@v3.4.6
with:
heroku_api_key: ${{secrets.NEW_HEROKU_API_KEY}}
heroku_app_name: "myapp"
heroku_email: "email@email.com"
branch: autodeploy
appdir: frontend
- run: echo "Deployed"
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Problems with Environment Variables
Environment variable is not set · Environment variable set to non-existent directory · Environment variable is not properly set.
Read more >New Environment Variables Not Working in Windows 10
New Environment Variables Not Working in Windows 10. I am trying to put in paths to my php install and php composer. Here's...
Read more >The error environment variable - IBM
The error environment variable is a special variable that holds data about Runtime Exception events. This variable is null until an exception happens....
Read more >Environment variables: Should they be considered harmful?
“Environment variables are an essential part of how things run under unix/linux systems,” explained John Bambenek, manager of threat systems at Fidelis ...
Read more >Windows 10 System environment variables don't stick
I am unable to update my system environment variable PATH. I don't receive any error message when editing PATH, but the change doesn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @uinstinct, I’ve added the feature to pull env variables from a .env file. Please check the updated environmental variables part of the readme file here on how to do this.
Do let me know if this solves your issue and if it does, please close the issue
No the Action won’t add and commit any changes before pushing it (Although I have been considering adding that since many of the issues coming up have been related to changes made before deployment not being recognized).
But you can just do that yourself by adding a run command to your workflow file before the deploy action that looks like this
If you’re worried that the env file is in your .gitignore file then you won’t need to commit it at all and the action will still be able to read the file since it’s generated into the filesystem (once I add the feature)