gptbot/.drone.yml
rainerosion bcfb9a47d6
All checks were successful
continuous-integration/drone/push Build is passing
cicd
2023-04-15 14:26:34 +08:00

39 lines
996 B
YAML

kind: pipeline
type: docker
name: wechat-bot
steps:
- name: gobuild
image: golang:alpine
pull: if-not-exists
environment:
GOPROXY: https://goproxy.cn
commands:
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
- apk update && apk add build-base
- cd wechatbot && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o chatgpt-arm64
- name: upload
image: hkccr.ccs.tencentyun.com/xiaoqidun/gocos
settings:
secret_id:
from_secret: cos_secret_id
secret_key:
from_secret: cos_secret_key
bucket_url:
from_secret: cos_bucket_url
source: wechatbot/chatgpt-arm64
target: cicd
- name: gitea_release
image: plugins/gitea-release
pull: if-not-exists
settings:
api_key:
from_secret: gitea_token
base_url: https://git.rainss.cn
files:
- wechatbot/chatgpt-arm64
checksum:
- sha256
when:
event:
- tag