Github action deployment fails

Fly deployment works fine locally but thru github actions it fails no matter what config i try (local or remote):

The stack trace doesn’t give any clues :confused: I contacted fly support and they are not sure. I have Dockerfile and toml in the root directory of the repo

Run flyctl deploy --local-only  --wait-timeout=300
==> Verifying app config
Validating /home/runner/work/web-client/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
==> Creating build context
--> Creating build context done
time="2023-07-03T00:40:31Z" level=error msg="Error matching .dev: syntax error in pattern"
==> Building image with Docker
--> docker host: 20.10.25+azure-2 linux x86_64
Sending build context to Docker daemon  1.024kB
Error: failed to fetch an image or build from source: error building: error building with docker: Error response from daemon: Cannot locate specified Dockerfile: Dockerfile

Strange :thinking:

It could be worth trying Fly’s provided remote builder. It’s free. Just remove the --local-only flag from the first line. Unless there is a need to build locally. Since it doesn’t seem to find your Dockerfile locally.

If that works/doesn’t it may help with debugging.

Here is output for --remote-only:

Run flyctl deploy --remote-only --config fly.toml  --wait-timeout=300
==> Verifying app config
--> Verified app config
Validating fly.toml
Platform: machines
✓ Configuration is valid
==> Building image
Waiting for remote builder fly-builder-dry-water-5845...
Remote builder fly-builder-dry-water-5845 ready
==> Creating build context
--> Creating build context done
time="2023-07-03T21:22:43Z" level=error msg="Error matching .dev: syntax error in pattern"
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon      32B

#1 [internal] load remote build context
#1 CACHED

#2 copy /context /
#2 CACHED
Error: failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /data/docker/tmp/buildkit-mount705209440/Dockerfile: no such file or directory

The git repo is private and my first time deploying was via windows flyctl.exe, not sure if they borked something.

Looks to have been an issue with flyctl v0.1.47. Please upgrade to v0.1.48, since it should revert the breaking change.

@billy can you please test, it still fails for me in github actions, here is my .github/workflow/fly.yaml:

name: project on Fly.io
on:
  push:
    branches:
      - main
jobs:
  deploy:
    name: Deploy app
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: flyctl deploy --remote-only --config fly.toml  --wait-timeout=300
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

I just ran again, since its github action it would be using 0.1.48 i presume? I deleted the built machine so it creates a new one and it still failed:

==> Verifying app config
Validating fly.toml
Platform: machines
--> Verified app config
✓ Configuration is valid
==> Building image
WARN Failed to start remote builder heartbeat: Not authorized to access this firecrackerapp
Waiting for remote builder fly-builder-patient-pine-8746...
Remote builder fly-builder-patient-pine-8746 ready
==> Creating build context
--> Creating build context done
time="2023-07-04T04:27:53Z" level=error msg="Error matching .dev: syntax error in pattern"
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon      32B

#1 [internal] load remote build context
#1 DONE 0.0s

#2 copy /context /
#2 DONE 0.0s
Error: failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /data/docker/tmp/buildkit-mount282603273/Dockerfile: no such file or directory

Error: Process completed with exit code 1.

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