From 7dd506c62481627390e3d53903c0039e4696a350 Mon Sep 17 00:00:00 2001 From: franktrue Date: Sun, 30 Apr 2023 20:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E7=BD=B2=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..f352301 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,26 @@ +kind: pipeline +type: docker +name: api2gpt-mid + +steps: + - name: build + image: golang:1.18-alpine + commands: + - go env -w GOPROXY=https://goproxy.cn,direct + - go mod download + - CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o api2gpt-mid + - name: sync-file + image: drillster/drone-rsync + settings: + user: root + key: + from_secret: ssh_key + hosts: # 多个ip使用,隔开 + from_secret: ssh_host + # 来源目录 + source: ./api2gpt-mid + # 目标服务器目录 + target: /mnt/data/wwwroot/api2gpt/mid + script: + - cd /mnt/data/wwwroot/api2gpt/mid + - ./api2gpt-mid \ No newline at end of file