Simulating PR Review Apps via GitHub Actions

Not all flyctl commands are automate-able, ref:

  1. Some flyctl commands do not provide a flag to confirm prompts in advance · Issue #933 · superfly/flyctl · GitHub
  2. Need to automatically accept the warning when setting a secret in GitHub actions using the superfly/flyctl-actions@1.1 - #2 by ignoramous

You can set env vars with flyctl deploy command (either with the flyctl deploy -e K1=V1 -e K2=V2 ... switch or declaring an [env] section in your fly.toml) rather than execute a separate command. For secrets, only build-time secrets can be set with flyctl deploy. Runtime secrets will have to be set out-of-band, I am afraid.

If you’re up for it, you can consider sending a pull-request for non-interactive modes for the flyctl commands you want to use with gh-actions: GitHub - superfly/flyctl: Command line tools for fly.io services