Skip to content

Commit

Permalink
Build linux/arm64 images (#243)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz authored Aug 13, 2024
1 parent 7419191 commit 18d8cd4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ jobs:
build-and-publish-images:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to AWS Public ECR
uses: docker/login-action@v3
with:
Expand All @@ -23,21 +25,19 @@ jobs:
id: extract_tag_name
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build and push clowarden-dbmigrator image
run: |
docker build \
-f database/migrations/Dockerfile \
-t public.ecr.aws/g6m3a0y9/clowarden-dbmigrator:${{steps.extract_tag_name.outputs.tag}} \
-t public.ecr.aws/g6m3a0y9/clowarden-dbmigrator:latest \
.
docker push --all-tags public.ecr.aws/g6m3a0y9/clowarden-dbmigrator
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
file: database/migrations/Dockerfile
tags: public.ecr.aws/g6m3a0y9/clowarden-dbmigrator:${{steps.extract_tag_name.outputs.tag}},public.ecr.aws/g6m3a0y9/clowarden-dbmigrator:latest
push: true
- name: Build and push clowarden-server image
run: |
docker build \
-f clowarden-server/Dockerfile \
-t public.ecr.aws/g6m3a0y9/clowarden-server:${{steps.extract_tag_name.outputs.tag}} \
-t public.ecr.aws/g6m3a0y9/clowarden-server:latest \
.
docker push --all-tags public.ecr.aws/g6m3a0y9/clowarden-server
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
file: clowarden-server/Dockerfile
tags: public.ecr.aws/g6m3a0y9/clowarden-server:${{steps.extract_tag_name.outputs.tag}},public.ecr.aws/g6m3a0y9/clowarden-server:latest
push: true

package-and-publish-helm-chart:
needs:
Expand Down
3 changes: 2 additions & 1 deletion clowarden-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build clowarden
FROM rust:1-alpine3.20 as builder
FROM rust:1-alpine3.20 AS builder
RUN apk --no-cache add musl-dev perl make
WORKDIR /clowarden
COPY Cargo.* ./
Expand All @@ -15,6 +15,7 @@ RUN apk --no-cache add git
WORKDIR /web
COPY web .
ENV NODE_OPTIONS=--max_old_space_size=4096
RUN yarn config set network-timeout 1000000
RUN yarn install --network-concurrency 1
RUN yarn build

Expand Down

0 comments on commit 18d8cd4

Please sign in to comment.