All checks were successful
continuous-integration/drone/push Build is passing
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
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
|
|
- mkdir wechatbot
|
|
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./wechatbot/chatgpt-arm64
|
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./wechatbot/chatgpt-amd64
|
|
- name: upload-tencent-cos
|
|
image: rainteam/gocos:latest
|
|
settings:
|
|
secret_id:
|
|
from_secret: cos_secret_id
|
|
secret_key:
|
|
from_secret: cos_secret_key
|
|
bucket_url:
|
|
from_secret: cos_bucket_url
|
|
source: wechatbot
|
|
target: cicd
|
|
- name: upload-upyun
|
|
image: rainteam/upcos:latest
|
|
settings:
|
|
up_operator:
|
|
from_secret: up_operator
|
|
up_password:
|
|
from_secret: up_password
|
|
up_bucket:
|
|
from_bucket: up_bucket
|
|
local_base_path: wechatbot
|
|
remote_base_path: gitea/devops
|
|
- 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
|
|
- ./wechatbot/chatgpt-amd64
|
|
checksum:
|
|
- sha256
|
|
when:
|
|
event:
|
|
- tag |