Setting secrets before the first deployment does nothing

I’m having the same issue with a GitHub Action to handle review environments (creating/deploying/destroying fly applications for PR branches).

  1. we create/launch a new application with flyctl launch [...] --no-deploy
  2. we set secrets (we’ve checked and secrets are correctly set) although we’re getting the same error Secrets are staged for the first deployment as the OP
  3. we do a first deploy, that is successful but secrets are empty.
  4. we set secrets again, exactly like step 2, and we now have secrets.

This really seems to be an issue with Fly, if anyone has any fix for this we would be glad.

Also, it’s very strange but when we deploy the app for the very first time (3) the version assigned by fly is v2 and we deploy it again (4) the version is v1.

1 Like