Browse Source

cache

master
cobb 4 years ago
parent
commit
6edb87d0ce
  1. 8
      .drone.yml

8
.drone.yml

@ -16,13 +16,12 @@ steps:
restore: true
cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}'
archive_format: "gzip"
filesystem_cache_root: "/tmp/repotest"
mount:
- pkg.mod
- pkg.build
volumes:
- name: cache
path: /tmp/repotest
path: /go
# golang 编译
- name: build
@ -38,7 +37,7 @@ steps:
- go build -ldflags "-w -s" -o tmp/carp main.go
volumes:
- name: cache
path: /tmp/repotest
path: /go
when:
event:
- push
@ -53,13 +52,12 @@ steps:
rebuild: true
cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}'
archive_format: "gzip"
filesystem_cache_root: "/tmp/repotest"
mount:
- pkg.mod
- pkg.build
volumes:
- name: cache
path: /tmp/repotest
path: /go
# 发布,编译镜像并推送到私有镜像仓库
- name: publish

Loading…
Cancel
Save