planetarium / NineChronicles.Headless

A headless node of NineChronicles game network, powered by Libplanet.
https://planetarium.github.io/NineChronicles.Headless/
GNU Affero General Public License v3.0
36 stars 42 forks source link

Build images with single file in `push_docker_image` workflow #2609

Closed moreal closed 1 week ago

moreal commented 1 week ago

Overview

Please make push_docker_image to build linux/arm64 and linux/amd64 image with single dockerfile.

The following links will be helpful when working on this issue:

🙌🏻 Context

Now, there are Dockerfile.amd64 and Dockerfile.arm64v8 files to build for each platforms.

https://github.com/planetarium/NineChronicles.Headless/blob/c879bd5d8d8730b27547b11a93d210a811db8dab/.github/workflows/push_docker_image.yml#L51-L66

But there are no difference between two dockerfiles and docker buildx build --platforms linux/amd64,linux/arm64 command can the two platforms at once.

# https://github.com/planetarium/mimir/blob/2ce505fb86f0dac98ffed16d30581371555a85e3/.github/workflows/docker.yaml
-
  name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v3
  with:
    platforms: linux/arm/v8,linux/amd64
-
  name: Build and push
  uses: docker/build-push-action@v5
  with:
    push: ${{ github.event_name != 'pull_request' }}
    platforms: linux/arm64,linux/amd64
    tags: ${{ matrix.docker.repo }}:git-${{ github.sha }}
    file: ${{ matrix.docker.dockerfile }}

Since https://github.com/planetarium/NineChronicles.Headless/pull/2599, Dockerfile and Dockerfile.Acc are now able to build both linux/arm64 and linux/amd64. But I missed to make the push_docker_image workflow to build images with the Dockerfile and Dockerfile.Acc file.

So this issue suggests to fix the missed work.

Gongkirby commented 1 week ago

제가 해보겠습니다!

riemannulus commented 1 week ago

2610 should be the next step.