AkhileshNS / heroku-deploy

A simple github action that dynamically deploys an app to heroku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing some env_file variables

susannakosic opened this issue · comments

Hi,
I m using this action to deploy a monorepo to heroku.
See below config for api deployment:

- name: Deploy server
        uses: akhileshns/heroku-deploy@v3.12.12
        with:
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: "sga-s"
          heroku_email: ${{secrets.HEROKU_API_KEY}}
          env_file: ".env.prod"
        env:
          HD_APP_BASE: "components/server"

.env.prod file contains a bunch of env vars:

OAUTH_ENABLED=true
SGA_S_HOST=bah
SGA_SPA=buh
OAUTH_DOMAIN=bah
OAUTH_CLIENT_ID=buh buh
OAUTH_JWKS_URI=buh buh
OAUTH_AUDIENCE=buh buh
CORS_ORIGINS=bah
MONGO=buh buh
NODE_ENV=production
USERNAME_KEY=buh buh
LOG_LEVEL=info

However once the job is done, I can only see a subset of this vars being set. Those are:

OAUTH_ENABLED=true
SGA_S_HOST=bah
SGA_SPA=buh
OAUTH_DOMAIN=bah
OAUTH_CLIENT_ID=buh buh
OAUTH_JWKS_URI=buh buh
OAUTH_AUDIENCE=buh buh
CORS_ORIGINS=bah
MONGO=buh buh

On the job/action logs I can see:

Created and wrote to ~/.netrc
Successfully logged into heroku
 ›   Warning: Our terms of service have changed: 
Added git remote heroku
 ›   https://dashboard.heroku.com/terms-of-service
 ›   Warning: heroku update available from 7.59.2 to 7.59.4.
Setting APP_BASE, OAUTH_ENABLED, SGA_S_HOST, SGA_SPA, OAUTH_DOMAIN, OAUTH_CLIENT_ID, OAUTH_JWKS_URI, OAUTH_AUDIENCE, CORS_ORIGINS, MONGO and restarting sga-s... done, v125
remote: Compressing source files... done.     

So, as you can see from logs above USERNAME_KEY and LOG_LEVEL are missing.
I've manually deleted the env vars from the Heroku app and redeployed, still got the same behaviour, so ended up manually adding missing vars.

Any idea why this could be happening?