Skip to content

Commit

Permalink
fix: publish docker image workflow (#830)
Browse files Browse the repository at this point in the history
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: nodejs/docker-node#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>
  • Loading branch information
BachErik and github-actions[bot] authored Jul 29, 2024
1 parent d6f80ca commit be2ec7d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ 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:
registry: ${{ env.REGISTRY }}
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
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ See the [contribution docs](https://docs.bracketapp.nl/docs/community/contributi
<!-- readme: collaborators,contributors,dependabot/- -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/BachErik">
<img src="https://avatars.githubusercontent.com/u/75324423?v=4" width="100;" alt="BachErik"/>
<br />
<sub><b>BachErik</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/evroon">
<img src="https://avatars.githubusercontent.com/u/11857441?v=4" width="100;" alt="evroon"/>
Expand Down
7 changes: 7 additions & 0 deletions docs/docs/community/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ translation for you, and then carefully check and correct any mistakes.
<!-- readme: collaborators,contributors,dependabot/- -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/BachErik">
<img src="https://avatars.githubusercontent.com/u/75324423?v=4" width="100;" alt="BachErik"/>
<br />
<sub><b>BachErik</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/evroon">
<img src="https://avatars.githubusercontent.com/u/11857441?v=4" width="100;" alt="evroon"/>
Expand Down

0 comments on commit be2ec7d

Please sign in to comment.