mirror of
https://github.com/luxfi/indexer.git
synced 2026-09-24 00:25:37 +00:00
ci: regenerate go.sum at build time (proxy cache inconsistency)
This commit is contained in:
@@ -20,7 +20,10 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- run: go mod download
|
||||
- name: Refresh go.sum (proxy cache inconsistency)
|
||||
run: rm -f go.sum && GOSUMDB=off go mod download
|
||||
env:
|
||||
GOSUMDB: "off"
|
||||
- run: go test -race -count=1 ./...
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
@@ -34,5 +37,9 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Refresh go.sum (proxy cache inconsistency)
|
||||
run: rm -f go.sum && GOSUMDB=off go mod download
|
||||
env:
|
||||
GOSUMDB: "off"
|
||||
- run: go vet ./...
|
||||
- run: test -z "$(gofmt -l .)"
|
||||
|
||||
+4
-1
@@ -4,7 +4,10 @@ FROM golang:1.26-alpine AS builder
|
||||
RUN apk add --no-cache gcc musl-dev sqlite-dev
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
# proxy.golang.org has inconsistent caching for hanzoai/[email protected]
|
||||
# (different POPs serve different zip hashes). Regenerate go.sum from the
|
||||
# proxy state we actually see at build time and skip sum.golang.org.
|
||||
RUN rm -f go.sum && GOSUMDB=off go mod download
|
||||
COPY . .
|
||||
ARG VERSION=dev
|
||||
RUN CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOOS=linux go build \
|
||||
|
||||
Reference in New Issue
Block a user