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 - package
- deploy - deploy
.go-cache:
variables:
GOPATH: $CI_PROJECT_DIR/.go
before_script:
- mkdir -p .go
cache:
paths:
- .go/pkg/mod/
golang-build: golang-build:
only: only:
- master - master
@ -19,7 +10,12 @@ golang-build:
- test - test
stage: build stage: build
image: golang:1.22.0 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: script:
- | - |
export GOPROXY="https://goproxy.cn" export GOPROXY="https://goproxy.cn"