Skip to content

Commit

Permalink
Merge pull request #953 from ictsc/go-toolchain
Browse files Browse the repository at this point in the history
feat: use go toolchain
  • Loading branch information
tosuke authored Jan 1, 2025
2 parents b412474 + 4be14aa commit 41895cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
- name: Setup Go Toolchain
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version: stable
cache: false
- name: Restore Module Cache
uses: actions/cache/restore@v4
Expand Down
7 changes: 4 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.23.4 AS builder
FROM --platform=$BUILDPLATFORM golang AS builder
ENV GOTOOLCHAIN=auto
ENV CGO_ENABLED=0
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
--mount=type=bind,source=go.mod,target=go.mod \
--mount=type=bind,source=go.sum,target=go.sum \
go mod download -x
go mod download
ARG TARGETOS
ARG TARGETARCH
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
ENV CGO_ENABLED=0

# --- score server ---
FROM --platform=$BUILDPLATFORM builder AS scoreserver-builder
Expand Down

0 comments on commit 41895cb

Please sign in to comment.