Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f8327546c | |||
| bf77ee8a6d | |||
| 6d2e9ed8b8 | |||
| 2fe5faa2bf | |||
| ed02e777c1 | |||
| 8f92c031f4 | |||
| e189ee2d98 | |||
| 4e841dfaac | |||
| df83e76d7f | |||
| 9666147f36 | |||
| 64f5db14da | |||
| 74859ac163 | |||
| 25e586c07c | |||
| 46bcf556f8 | |||
| 69899afe3e | |||
| 508059a8c2 | |||
| c23a09663d | |||
| 8223afcadb | |||
| b15f2902ed | |||
| d4df8435ac | |||
| c139ab444d | |||
| e30df5f691 | |||
| 9c9a3fc36e | |||
| 9a837e88cd | |||
| 717185ad3d |
57
.drone.yml
57
.drone.yml
@ -2,23 +2,40 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: E5SubBotForSQLite
|
name: E5SubBotForSQLite
|
||||||
steps:
|
steps:
|
||||||
- name: gobuild
|
- name: gobuild
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
environment:
|
||||||
- apk update && apk add build-base
|
GOPROXY: https://goproxy.cn
|
||||||
- GOPROXY=https://goproxy.cn CGO_ENABLED=1 go build
|
commands:
|
||||||
- name: gitea_release
|
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
image: plugins/gitea-release
|
- apk update && apk add build-base
|
||||||
pull: if-not-exists
|
- CGO_ENABLED=1 go build
|
||||||
settings:
|
|
||||||
api_key:
|
- name: gitea_release
|
||||||
from_secret: gitea_token
|
image: plugins/gitea-release
|
||||||
base_url: https://git.rainss.cn
|
pull: if-not-exists
|
||||||
files:
|
settings:
|
||||||
- main
|
api_key:
|
||||||
checksum:
|
from_secret: gitea_token
|
||||||
- md5
|
base_url: https://git.rainss.cn
|
||||||
- sha256
|
files:
|
||||||
when:
|
- main
|
||||||
event: tag
|
checksum:
|
||||||
|
- sha256
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: plugins/docker:latest
|
||||||
|
pull: if-not-exists
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
repo: rainerosion/e5subbot
|
||||||
|
tags: latest
|
||||||
|
build_args:
|
||||||
|
- E5SubBotFile=./main
|
||||||
|
dockerfile: drone/Dockerfile
|
||||||
@ -35,4 +35,5 @@ changelog:
|
|||||||
filters:
|
filters:
|
||||||
exclude:
|
exclude:
|
||||||
- '^docs:'
|
- '^docs:'
|
||||||
- '^test:'
|
- '^test:'
|
||||||
|
|
||||||
8
drone/Dockerfile
Normal file
8
drone/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
ARG E5SubBotFile
|
||||||
|
ENV TIME_ZONE=Asia/Shanghai
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && apk update && apk add tzdata \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
|
||||||
|
WORKDIR /root
|
||||||
|
ADD ${E5SubBotFile} /root/
|
||||||
|
CMD [ "/root/main" ]
|
||||||
Loading…
Reference in New Issue
Block a user