If you’re already checking out your code: the error message can be a little confusing because the error message actually means that Fly could not identify the app that you’re trying to deploy. A cause of this can be a missing fly.toml but it could also be the absence of a well-formatted app in the fly.toml. There are other ways to specify a fly app, like an Environment Variable, which could be why it’s working in your local environment. Each of the following examples will work even if your fly.toml is missing an app:
FLY_APP="example" fly info
export FLY_APP="example"
fly info
fly info -a example
If you can post your fly.toml here the problem might jump out at someone, alternatively, you could confirm that this is the problem yourself by explicitly specifying your app name in the GitHub Actions command, e.g:
- flyctl deploy --remote-only ./target/docker/stage --config fly.toml
+ flyctl deploy --remote-only ./target/docker/stage --config fly.toml -a example
note: In general, if you’re using the default fly.toml location then you do not need to use the config flag but it shouldn’t cause any problems.