Deploy image using GitHub actions

I’m using superfly/flyctl-actions/setup-flyctl@master in my CI workflow:

    - name: Docker build and publish
      run: |
        export BUILD_NUMBER=${{ steps.set_build_number.outputs.build_number }}
        flyctl auth docker
        docker build ./app_published --file ./src/Xbz.Integration.Api.Entrypoint/Dockerfile -t registry.fly.io/xbz-integration-api:$BUILD_NUMBER
        docker push registry.fly.io/xbz-integration-api:$BUILD_NUMBER
        flyctl deploy ./src/Xbz.Integration.Api.Entrypoint --image registry.fly.io/xbz-integration-api:$BUILD_NUMBER --local-only

But the docker push outputs:

The push refers to repository [registry.fly.io/xbz-integration-api]
3f9fe973c6ab: Preparing
09b231a06a7f: Preparing
2594a67c648b: Preparing
be5ff1cb24e9: Preparing
ed40a7c370df: Preparing
0e007bc7a49a: Preparing
a4347313b43f: Preparing
5d4427064ecc: Preparing
a4347313b43f: Waiting
5d4427064ecc: Waiting
0e007bc7a49a: Waiting
name unknown: app repository not found

I created the token using fly tokens create deploy.

In my local-machine it works as expected.

I found the issue, the token must be created using flyctl auth token

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