From be2ec7d9dd8fa289bd0635a406e7b4c943cd10a1 Mon Sep 17 00:00:00 2001 From: BachErik <75324423+BachErik@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:17:30 +0200 Subject: [PATCH] fix: publish docker image workflow (#830) After many tests, I have now discovered that there is currently a problem with node and arm64 in GitHub workflows. There is the following issue: https://github.com/nodejs/docker-node/issues/1335. As already mentioned at the top of the Node.js issue, a possible solution would be to run it in offline mode, i.e. to cache the packages. I have now adapted the GitHub workflow file so that it already works. As you have already correctly noted, I have added QEMU. Since this problem only affects Node, the backend is not affected and already has the multi-architecture variant. To give the frontend multi-arch as well, you would only have to add `linux/arm64` to the platform, and then it should also work there. But I still have a question: Why do you not work with the versions in the workflow file, but with special commits? --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/publish_docker_image.yml | 11 +++++++---- README.md | 7 +++++++ docs/docs/community/contributing.md | 7 +++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_docker_image.yml b/.github/workflows/publish_docker_image.yml index cb39ee59..32a96096 100644 --- a/.github/workflows/publish_docker_image.yml +++ b/.github/workflows/publish_docker_image.yml @@ -22,6 +22,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: @@ -29,9 +35,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Extract metadata (tags, labels) for frontend Docker image id: meta_frontend uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c @@ -52,7 +55,7 @@ jobs: file: frontend/Dockerfile tags: ${{ steps.meta_frontend.outputs.tags }} labels: ${{ steps.meta_frontend.outputs.labels }} - platforms: linux/amd64,linux/arm64/v8 + platforms: linux/amd64 - name: Build and push backend Docker image uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 diff --git a/README.md b/README.md index e432d626..56031180 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,13 @@ See the [contribution docs](https://docs.bracketapp.nl/docs/community/contributi