ci: 添加 Gitea Actions 示例工作流
- 新增 ci.yaml 文件,定义 Gitea Actions 示例
This commit is contained in:
37
.drone.yml
Normal file
37
.drone.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: golang:1.22
|
||||||
|
commands:
|
||||||
|
- go mod tidy
|
||||||
|
- go build -o main.exe .
|
||||||
|
|
||||||
|
- name: upload
|
||||||
|
image: appleboy/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
|
||||||
|
# image: appleboy/ssh
|
||||||
|
# settings:
|
||||||
|
# host: 你的服务器IP或域名
|
||||||
|
# username: 你的SSH用户名
|
||||||
|
# password:
|
||||||
|
# from_secret: scp_password
|
||||||
|
# port: 22
|
||||||
|
# script:
|
||||||
|
# - cd /your/deploy/path/
|
||||||
|
# - chmod +x start.sh
|
||||||
|
# - ./start.sh
|
||||||
Reference in New Issue
Block a user