ci(drone): 添加 Go 模块和构建缓存

- 在 restore cache 和 rebuild cache 步骤中添加了 go-mod-cache 和 go
This commit is contained in:
hxt
2025-07-08 21:14:58 +08:00
parent 5f821fe1d1
commit d9384ded4c

View File

@@ -21,6 +21,8 @@ steps:
- name: build - name: build
image: golang:1.22 image: golang:1.22
commands: commands:
- mkdir -p /go/pkg/mod
- mkdir -p /root/.cache/go-build
- echo "test" > /go/pkg/mod/testfile - echo "test" > /go/pkg/mod/testfile
- echo "==== Before build, go/pkg/mod ====" - echo "==== Before build, go/pkg/mod ===="
- ls -lR /go/pkg/mod || echo "/go/pkg/mod not found" - ls -lR /go/pkg/mod || echo "/go/pkg/mod not found"