ci: 添加 Gitea Actions 示例工作流
- 新增 ci.yaml 文件,定义 Gitea Actions 示例
This commit is contained in:
22
.drone.yml
22
.drone.yml
@@ -3,12 +3,34 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: restore cache
|
||||
image: drillster/drone-cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- go/pkg/mod
|
||||
- ~/.cache/go-build
|
||||
backend: local
|
||||
cache_key: go-mod-cache-{{ checksum "go.sum" }}
|
||||
|
||||
- name: build
|
||||
image: golang:1.22
|
||||
commands:
|
||||
- go env -w GO111MODULE=on
|
||||
- go env -w GOPROXY=https://goproxy.cn,direct
|
||||
- go mod tidy
|
||||
- go build -o main.exe .
|
||||
|
||||
- name: rebuild cache
|
||||
image: drillster/drone-cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- go/pkg/mod
|
||||
- ~/.cache/go-build
|
||||
backend: local
|
||||
cache_key: go-mod-cache-{{ checksum "go.sum" }}
|
||||
|
||||
- name: upload
|
||||
image: appleboy/scp
|
||||
settings:
|
||||
|
||||
Reference in New Issue
Block a user