Is it possible to combine both env vars from CLI flags and fly.toml config?

I have most of my configuration set in my fly.toml file, including various environment variables. I’d like to however set the environment variable APP_REVISION not in the config file, but via the CLI when I deploy from GithubActions, so that it references the current git sha. Basically I want to do this:

    name: deploy
    environment: staging
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: flyctl deploy --remote-only --config fly.staging.toml --env APP_REVISION=$GITHUB_SHA --image-label=deploy-$GITHUB_SHA
        name: deploy api
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

But when I do this, all of the environment variable set in fly.toml seem to be cleared. So it seems that I can set environment variables EITHER via fly.toml OR via the CLI, but not through a combination of both? Is there some other way I am missing?

1 Like

This is a known bug. We do need to get it fixed!

Thanks! I’ve subscribed to the issue and hope this will be fixed at some point :slight_smile: