42 lines
976 B
YAML
42 lines
976 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: ssh-manager
|
|
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
|
|
- go build
|
|
|
|
- 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:
|
|
- ssh_manage
|
|
checksum:
|
|
- sha256
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: publish_docker
|
|
image: plugins/docker:latest
|
|
pull: if-not-exists
|
|
settings:
|
|
username:
|
|
from_secret: hub_username
|
|
password:
|
|
from_secret: hub_password
|
|
repo: rainerosion/ssh-manager
|
|
tags: latest
|
|
build_args:
|
|
- ssh_manage=./ssh_manage
|
|
dockerfile: drone/Dockerfile |