Hello,
I am trying to push a container image to Fly.io’s container registry. Here is a snip my CI code:
Note: The ‘repo_path’ env variable is stated at the global level for this CI.
docker-build-push:
runs-on: ubuntu-latest
concurrency:
group: docker-build-push
env:
APP_NAME: "my-app"
DOCKER_REGISTRY: "registry.fly.io"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Up CLI
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set Up Docker
uses: docker/setup-buildx-action@v3
- name: Log Into Docker Registry
run: |
flyctl auth docker --access-token ${{ secrets.FLY_IO_API_TOKEN }}
docker info
- name: Build and Push Docker Image
run: |
docker buildx build \
--push \
--tag "${{ env.DOCKER_REGISTRY }}/${{ env.APP_NAME }}:${{ github.sha }}" \
.
working-directory: "${{ env.repo_path }}/app"
In the job output, the auth seems to succeed, as does the docker build, but I get this error:
#43 ERROR: failed to push registry.fly.io/my-app:4e263ec86a69f10851c9a5aa2700fb8f805ad0c7: unexpected status from POST request to https://registry.fly.io/v2/my-app/blobs/uploads/: 404 Not Found
------
> exporting to image:
------
ERROR: failed to solve: failed to push registry.fly.io/my-app:4e263ec86a69f10851c9a5aa2700fb8f805ad0c7: unexpected status from POST request to https://registry.fly.io/v2/my-app/blobs/uploads/: 404 Not Found
I’ve been at this for a while and tried all sorts of different strings for the image tag. Can anybody help me figure this out?
Note: I am 1000% sure that the ‘my-app’ exists and that my API token works for all sorts of other API calls etc. I think I am simply formatting it incorrectly but every article I’ve read shows that what I am doing should be correct.