This is going to sound silly, but the best way to automate Fly deploys is probably to just run flyctl
from your bot code.
Heroku pipeline promotions basically work by deploying the result of a previous build. The basic process of this on Fly is:
- Build your Docker image, probably with a CI tool
- Tag image with
registry.fly.io/<app>:<tag>
- Push to registry.fly.io
flyctl deploy -i registry.fly.io/<app>:<tag>
You can use our GraphQL API to replicate this logic but it’s more work. And flyctl
is designed to be easy to run, you can just bundle it with your bot and shell out to it directly.