diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0c1996..346601a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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: diff --git a/clowarden-server/Dockerfile b/clowarden-server/Dockerfile index 0db0881..e3ca8d9 100644 --- a/clowarden-server/Dockerfile +++ b/clowarden-server/Dockerfile @@ -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.* ./ @@ -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