36 lines
756 B
Go
36 lines
756 B
Go
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.22
|
|
commands:
|
|
- go env -w GO111MODULE=on
|
|
- go env -w GOPROXY=https://goproxy.cn,direct
|
|
- go mod tidy
|
|
- go build -v -o main main.go
|
|
|
|
- name: upload
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host: 193.112.151.199
|
|
username: root
|
|
password:
|
|
from_secret: scp_password
|
|
port: 222
|
|
source:
|
|
- main.exe
|
|
- scripts/start.sh
|
|
target: /opt/dockeropt/epic-go
|
|
|
|
- name: restart epic-go container
|
|
image: appleboy/ssh
|
|
settings:
|
|
host: 193.112.151.199
|
|
username: root
|
|
password:
|
|
from_secret: scp_password
|
|
port: 222
|
|
script:
|
|
- docker restart epic-go |