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>
This commit is contained in:
BachErik
2024-07-29 09:17:30 +02:00
committed by GitHub
parent d6f80caed3
commit be2ec7d9dd
3 changed files with 21 additions and 4 deletions

View File

@@ -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