Set GOTOOLCHAIN on Docker and CI

This commit is contained in:
WeebDataHoarder
2025-04-15 18:38:04 +02:00
parent ede95964cc
commit bf3a46e153
2 changed files with 6 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
---
environment:
GOTOOLCHAIN: "local"
CGO_ENABLED: "0"
GOARCH: amd64
GOOS: linux
@@ -40,6 +41,7 @@ steps:
type: docker
---
environment:
GOTOOLCHAIN: "local"
CGO_ENABLED: "0"
GOARCH: arm64
GOOS: linux
@@ -80,6 +82,7 @@ steps:
type: docker
---
environment:
GOTOOLCHAIN: "local"
CGO_ENABLED: "0"
GOARCH: amd64
GOOS: linux
@@ -120,6 +123,7 @@ steps:
type: docker
---
environment:
GOTOOLCHAIN: "local"
CGO_ENABLED: "0"
GOARCH: arm64
GOOS: linux

View File

@@ -7,6 +7,7 @@ FROM --platform=$BUILDPLATFORM ${from_builder} AS build
ARG TARGETARCH
ARG TARGETOS
ARG GOTOOLCHAIN=local
RUN apk update && apk add --no-cache \
bash \
@@ -22,6 +23,7 @@ RUN ./build-compress.sh
ENV CGO_ENABLED=0
ENV GOOS=${TARGETOS}
ENV GOARCH=${TARGETARCH}
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
RUN go build -pgo=auto -v -trimpath -o "${GOBIN}/go-away" ./cmd/go-away
RUN test -e "${GOBIN}/go-away"