ci: 添加 Gitea Actions 示例工作流

- 新增 ci.yaml 文件,定义 Gitea Actions 示例
This commit is contained in:
hu xiaotong
2025-07-08 16:40:47 +08:00
parent 15e1a0fd47
commit f3587141c0

View File

@@ -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: