diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 92e36c2..935213e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -18,3 +18,32 @@ jobs: sdk-tests: needs: [ build ] uses: ./.github/workflows/sdk-tests.yml + + docker-build: + name: Build Docker image (amd64 and arm64) + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' + cache: true + + - name: Prefetch dependencies + run: go mod vendor && make frontend + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image without publishing + uses: docker/build-push-action@v4 + with: + context: . + push: false + platforms: linux/amd64, linux/arm64/v8 + build-args: | + PREFETCHED=true diff --git a/Dockerfile b/Dockerfile index 232aca0..658b236 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.22 as builder +FROM --platform=$BUILDPLATFORM golang:1.24.1 AS builder ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -51,4 +51,4 @@ COPY --from=builder /app/bin/server /app/server VOLUME ["/app/data/"] -ENTRYPOINT ["/app/server"] \ No newline at end of file +ENTRYPOINT ["/app/server"]