E5SubBotForSQLite/.drone.yml

41 lines
942 B
YAML
Raw Normal View History

2021-03-24 17:39:18 +08:00
kind: pipeline
type: docker
name: E5SubBotForSQLite
steps:
2021-07-30 11:24:45 +08:00
- name: gobuild
image: golang:alpine
pull: if-not-exists
2021-07-30 11:34:27 +08:00
environment:
2021-07-30 11:39:14 +08:00
GOPROXY: https://goproxy.cn
2021-07-30 11:26:09 +08:00
commands:
2021-07-30 11:34:27 +08:00
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
- apk update && apk add build-base
- CGO_ENABLED=1 go build
2021-07-30 11:53:50 +08:00
2021-07-30 11:32:26 +08:00
- name: gitea_release
2021-07-30 11:24:45 +08:00
image: plugins/gitea-release
pull: if-not-exists
settings:
2021-07-30 11:32:26 +08:00
api_key:
2021-07-30 11:27:40 +08:00
from_secret: gitea_token
2021-07-30 11:24:45 +08:00
base_url: https://git.rainss.cn
files:
- main
checksum:
- sha256
when:
2021-07-30 11:53:19 +08:00
event: tag
2021-07-30 11:53:50 +08:00
2021-07-30 11:53:19 +08:00
- name: publish
image: plugins/docker:latest
pull: if-not-exists
settings:
username:
from_secret: hub_username
2021-07-30 11:54:32 +08:00
password:
from_secret: hub_password
2021-07-30 11:53:19 +08:00
repo: rainerosion/e5subbot
2021-07-30 12:36:29 +08:00
tags: latest
build_args:
2021-07-30 12:37:29 +08:00
- E5SubBotFile:./main
dockerfile: drone/Dockerfile