fix: add go mod download before build
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
d0574703f7
commit
b838f181d8
@ -14,6 +14,10 @@ WORKDIR /app
|
||||
COPY pkg/ ./pkg/
|
||||
COPY workers/worker-svc/ ./workers/worker-svc/
|
||||
|
||||
# Download dependencies (populates go.sum if empty)
|
||||
RUN cd pkg && go mod download
|
||||
RUN cd workers/worker-svc && go mod download
|
||||
|
||||
# Build from the worker directory (uses replace directive for ../pkg)
|
||||
RUN cd workers/worker-svc && CGO_ENABLED=0 go build -o /worker-svc ./cmd/worker
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user