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
|
name: default
|
||||||
|
|
||||||
steps:
|
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
|
- name: build
|
||||||
image: golang:1.22
|
image: golang:1.22
|
||||||
commands:
|
commands:
|
||||||
|
- go env -w GO111MODULE=on
|
||||||
|
- go env -w GOPROXY=https://goproxy.cn,direct
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
- go build -o main.exe .
|
- 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
|
- name: upload
|
||||||
image: appleboy/scp
|
image: appleboy/scp
|
||||||
settings:
|
settings:
|
||||||
|
|||||||
Reference in New Issue
Block a user