31 lines
516 B
YAML
31 lines
516 B
YAML
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: Scp File
|
||
|
|
||
|
# 手动触发或接口触发
|
||
|
trigger:
|
||
|
event:
|
||
|
- custom
|
||
|
|
||
|
steps:
|
||
|
- name: Scp File
|
||
|
image: appleboy/drone-scp
|
||
|
# 仅当本地不存在该镜像时才拉取
|
||
|
pull: if-not-exists
|
||
|
settings:
|
||
|
host:
|
||
|
from_secret: HOST
|
||
|
user:
|
||
|
from_secret: USER
|
||
|
password:
|
||
|
from_secret: PASSWORD
|
||
|
port:
|
||
|
from_secret: PORT
|
||
|
# 源文件路径
|
||
|
source: File/*
|
||
|
strip_components: 1
|
||
|
# 目标路径
|
||
|
target: /root/
|
||
|
when:
|
||
|
branch:
|
||
|
- main
|