From f3587141c0d9fc688d0a2ee1d740b634ea1a2190 Mon Sep 17 00:00:00 2001 From: hu xiaotong <416314413@163.com> Date: Tue, 8 Jul 2025 16:40:47 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=20Gitea=20Actions=20?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 ci.yaml 文件,定义 Gitea Actions 示例 --- .drone.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.drone.yml b/.drone.yml index 0656138..ddb4722 100644 --- a/.drone.yml +++ b/.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: