From 989b20feddfc7b2cdad9e58e3a8c53e6b66c2516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 7 Mar 2026 17:09:31 -0800 Subject: [PATCH] fix(ci): add vendor step for private Go module authentication Add a vendor step that uses gitea_token to fetch private modules from gitea.develooper.com, then subsequent steps use the vendored dependencies without needing credentials. --- .woodpecker.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index bc90fb2..6a734a0 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -15,6 +15,19 @@ variables: - go-pkg:/go/pkg steps: + - name: vendor + image: golang:1.26 + pull: true + environment: + GOMODCACHE: /go/pkg/mod + GOCACHE: /go/pkg/cache + volumes: *go_volumes + secrets: [gitea_token] + commands: + - printf "machine gitea.develooper.com\nlogin __token__\npassword $GITEA_TOKEN\n" > ~/.netrc + - go mod vendor + - rm -f ~/.netrc + - name: test image: golang:1.26 pull: true @@ -23,6 +36,7 @@ steps: commands: - go test -v ./... - go build ./... + depends_on: [vendor] - name: goreleaser image: golang:1.26