Automatic github actions deploys keeps failing

I am trying to deploy my app using github actions but i keep encountering this error:

==> Pushing image to fly
The push refers to repository [registry.fly.io/hafi-yawe]
83d85471d9f8: Preparing
060c6dd59a3b: Preparing
b28e272ad893: Preparing
3fd0a8444673: Preparing
bf5ccfcedbc5: Preparing
7f38163dd3ad: Preparing
8769f03310ec: Preparing
b4440cc8e4ff: Preparing
26a1b0864fd3: Preparing
867d0767a47c: Preparing
7f38163dd3ad: Waiting
8769f03310ec: Waiting
b4440cc8e4ff: Waiting
26a1b0864fd3: Waiting
867d0767a47c: Waiting
Error failed to fetch an image or build from source: error rendering push status stream: unauthorized: not allowed

PS: No Deployment has been successful so far.

Can you paste your Github action here?

name: Deploy to Fly
on:
  push:
    branches: [main]
jobs:
  deploy:
    name: Deploy To fly.io
    runs-on: ubuntu-latest
    steps:
      # This step checks out a copy of your repository.
      - uses: actions/checkout@v2
      # This step runs `flyctl deploy`.
      - uses: superfly/flyctl-actions@master
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
        with:
          args: "deploy"

Can you try with args: "deploy --remote-only"?

1 Like

Thanks Solved now!

1 Like

Hey im facing a similar issue this is my github action

name: Fly Deploy
on: [push]
env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
  deploy:
      name: qa-bot-gh
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: superfly/flyctl-actions/setup-flyctl@master
        - run: flyctl deploy --remote-only

and the error im getting

Tweak your github action like so (the older way) to see if then works?

steps:
  - uses: actions/checkout@v2
+ - uses: superfly/flyctl-actions@1.3
- - uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy --remote-only
+   with:
+     args: "deploy --remote-only"

edit1: …or (ref),

steps:
  - uses: actions/checkout@v2
  - uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy --remote-only
+ - run: "flyctl deploy --remote-only"

edit2:

And one could specify a dockerfile (if there isn’t one named Dockerfile in your project’s root) with flyctl’s --dockerfile /path/to/dockerfile switch (ref).

I tried the first edit with this :


and got the following

and I obviously have a fly.toml file

and with the second edit I got. :

The first edit looks to be missing the checkout step so the GitHub runner wouldn’t have access to your source files. Not positive that will resolve your whole issue but we may learn more!

what checkout step do you mean ? i following these examples GitHub - superfly/flyctl-actions: GitHub Action that wraps the flyctl and I dont see any checkout step

I guess you meant this :

but now im getting the same error

This error is saying it doesn’t know how to build your app. You can try one of two things:

  1. Clone the app, run fly launch in the app directory. This will generate either a Dockerfile or a fly.toml that has build instructions
  2. Change your deploy command to fly deploy --nixpacks: Build images with nixpacks

im getting this


what can i do ? this is an app that was imported from heroku , so the fly.toml was generated with this command
image

I think I ALMSOT got it , the fly.toml that i was getting from there was missing the build step maybe because i use the auto import from heroku . so i deleted that file and use the command you told me , but now i think there are parts missing for example i sue playwright and now im getting the following error :


on heroku i used a package that allowed me to use it , but i dont know how to do it here on fly.io , the auto importer did it right because playwright was working .
So que question would be how can I get the fly.toml that was generated with the auto importer ?

I used Turboku and i dont have access to the docker file or the fly.toml auto generated , they were not added into my repo, is there a way to obtain them . so i can integrate my github action ?

Oh I see.

Turboku actually pulls your prebuilt app down from Heroku (it’s basically a docker image), then deploys that. It doesn’t run through the fly launch process or create a Dockerfile for you.

@kurt but how can i connect it to github or obtain that image ? in the future i can to delete my heroku app and migrate everything to fly.io

now is not even redeploying after the deploy on heroku was made (I have being waiting more than an hour ,the first time it worked as you can see on the screenshot )
image

sorry for the insistence but can you help me ? I really need it :melting_face: