This commit is contained in:
shaoyongjun 2024-04-30 00:12:00 +08:00
parent d75aced248
commit e618be29ca

View File

@ -3,15 +3,6 @@ stages:
- package
- deploy
.go-cache:
variables:
GOPATH: $CI_PROJECT_DIR/.go
before_script:
- mkdir -p .go
cache:
paths:
- .go/pkg/mod/
golang-build:
only:
- master
@ -19,7 +10,12 @@ golang-build:
- test
stage: build
image: golang:1.22.0
extends: .go-cache
before_script:
- mkdir -p /root/go/pkg/mod
- env && echo $GOPATH
cache: [ ]
variables:
GOPATH: /root/go
script:
- |
export GOPROXY="https://goproxy.cn"