Can I build docker image legacy on Github Actions

I have a project on Github and I created a Github Actions for build Docker image and push that image to a docker (v 1.7.1) on another machice. But that docker cannot load image, because it’s OCI image. Can I build legacy image on Github Actions. Thanks all.

- name: "Checkout GitHub Action"
        uses: actions/checkout@main
      - name: get-npm-version
        id: package-version
        uses: martinbeentjes/npm-get-version-action@v1.3.1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Build Docker image in legacy format
        run: |
          cd src
          docker buildx build --output=type=docker --file  Dockerfile --tag image:tag .
          mkdir build
          docker save image:tag --output file.tar

If you need an image compatible with old Docker Daemon, you need an old Docker Daemon to build it.

MAybe you can use something like this: https://stackoverflow.com/a/59797984/2584843

But I’m actualyl not sure if that old version could be installed today. If you can’t, you could try running the Docker daemon in a container

Old tag: https://hub.docker.com/_/docker/tags?name=1.7.1-dind

The overview page of the image: https://hub.docker.com/_/docker