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:
jobs:
deployment:
name: deploy
environment: staging
runs-on: ubuntu-latest
steps:
- 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
env:
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?