Unable to deploy:Undeployed app has no platform version set

I’m trying to deploy an app with github actions and I get this error

==> Verifying app config
Error Undeployed app ‘villing’ has no platform version set

My app has already a fly.toml config and that same config works for deploying the same app under another branch

name: 🚀 Deploy
    timeout-minutes: 10
    runs-on: ubuntu-latest
    needs: [lint, typecheck, build]
    # only build/deploy main branch on pushes
    if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}

      - name: 🛑 Cancel Previous Runs
        uses: styfle/cancel-workflow-action@0.11.0

      - name: ⬇️ Checkout repo
        uses: actions/checkout@v3

      - name: 👀 Read app name
        uses: SebRollen/toml-action@v1.0.1
        id: app_name
          file: "apps/dashboard/fly.toml"
          field: "apps/dashboard/app"

      - name: 🚀 Deploy Staging
        if: ${{ github.ref == 'refs/heads/dev' }}
        uses: superfly/flyctl-actions@1.3
          args: "deploy --app villing-staging --image registry.fly.io/villing-staging"
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

      - name: 🚀 Deploy Production
        if: ${{ github.ref == 'refs/heads/main' }}
        uses: superfly/flyctl-actions@1.3
          args: "deploy --app villing --image registry.fly.io/villing"
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

this is the github action step

Hi @lukasalvarezdev!

The error message you’re receiving is not very informative (that’s on us!), but from my experience working on flyctl I think two things are happening:

  1. flyctl can’t find your fly.toml, so it tries to pull a stored copy of your app configuration down from the Fly API.
  2. Your app villing has actually never been deployed (1) doesn’t work.

Without knowing more about your setup, I’m not sure why this is happening or what to recommend. If you don’t mind, could you clarify a few things?

  • Is this error occurring when you push to the main branch?
  • You said it works deploying from another branch. Is that the dev branch (so you were actually deploying the villing-staging app), or something else?
  • I’m also curious why you are using --image to deploy. Are you building and pushing a Docker image separately from this GitHub action?

Hi!. The problem was that the app was never deployed, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.