Files
go-auth/.drone.yml
bea 5d837e47ef
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
ci: replace publish step with warm-proxy (Gitea serves modules from git tags natively)
2026-03-10 00:25:05 +01:00

87 lines
1.6 KiB
YAML

---
kind: pipeline
type: docker
name: go-auth-ci
trigger:
branch:
- main
- develop
event:
- push
- pull_request
environment:
GOPROXY: https://git.beatrice.wtf/api/packages/panic.haus/go,https://proxy.golang.org,direct
GONOSUMDB: git.beatrice.wtf
GONOSUMCHECK: git.beatrice.wtf
steps:
- name: test
image: golang:1.26
volumes:
- name: go-mod-cache
path: /go/pkg/mod
commands:
- go mod download
- go test ./... -count=1
- name: build
image: golang:1.26
volumes:
- name: go-mod-cache
path: /go/pkg/mod
commands:
- go build ./...
volumes:
- name: go-mod-cache
temp: {}
---
kind: pipeline
type: docker
name: go-auth-release
trigger:
event:
- tag
ref:
- refs/tags/v*
environment:
GOPROXY: https://git.beatrice.wtf/api/packages/panic.haus/go,https://proxy.golang.org,direct
GONOSUMDB: git.beatrice.wtf
GONOSUMCHECK: git.beatrice.wtf
steps:
- name: test
image: golang:1.26
volumes:
- name: go-mod-cache
path: /go/pkg/mod
commands:
- go mod download
- go test ./... -count=1
- name: build
image: golang:1.26
volumes:
- name: go-mod-cache
path: /go/pkg/mod
commands:
- go build ./...
- name: warm-proxy
image: golang:1.26
commands:
- MODULE=$(go list -m)
- VERSION=${DRONE_TAG}
- echo "Warming proxy for $MODULE@$VERSION"
- curl -sf "https://git.beatrice.wtf/api/packages/panic.haus/go/${MODULE}/@v/${VERSION}.info"
- echo "Registered $MODULE@$VERSION in Gitea package registry"
volumes:
- name: go-mod-cache
temp: {}