2019-05-11 17:03:14 +08:00
|
|
|
workflow "Copy File Via SSH" {
|
2019-05-11 17:01:31 +08:00
|
|
|
on = "push"
|
|
|
|
resolves = [
|
2019-05-11 19:28:30 +08:00
|
|
|
"Copy file via ssh password",
|
|
|
|
"Copy file via ssh key",
|
2019-05-11 17:01:31 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-05-11 19:28:30 +08:00
|
|
|
action "Copy file via ssh password" {
|
2019-05-11 17:01:31 +08:00
|
|
|
uses = "appleboy/scp-action@master"
|
|
|
|
env = {
|
|
|
|
SOURCE = "tests/a.txt,tests/b.txt"
|
|
|
|
TARGET = "/home/actions/test"
|
|
|
|
}
|
|
|
|
secrets = [
|
|
|
|
"HOST",
|
|
|
|
"USERNAME",
|
|
|
|
"PASSWORD",
|
|
|
|
]
|
|
|
|
}
|
2019-05-11 19:28:30 +08:00
|
|
|
|
|
|
|
action "Copy file via ssh key" {
|
|
|
|
uses = "appleboy/scp-action@master"
|
|
|
|
env = {
|
|
|
|
SOURCE = "tests/a.txt,tests/b.txt"
|
|
|
|
TARGET = "/home/actions/test"
|
|
|
|
}
|
|
|
|
secrets = [
|
|
|
|
"HOST",
|
|
|
|
"USERNAME",
|
|
|
|
"KEY",
|
|
|
|
]
|
|
|
|
}
|