You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.1 KiB
YAML
66 lines
1.1 KiB
YAML
6 years ago
|
workflow "Copy File Via SSH" {
|
||
6 years ago
|
on = "push"
|
||
|
resolves = [
|
||
6 years ago
|
"Copy file via ssh password",
|
||
|
"Copy file via ssh key",
|
||
6 years ago
|
"Add source in args",
|
||
|
"Add secret in args",
|
||
6 years ago
|
]
|
||
|
}
|
||
|
|
||
6 years ago
|
action "Copy file via ssh password" {
|
||
6 years ago
|
uses = "appleboy/scp-action@master"
|
||
|
env = {
|
||
|
SOURCE = "tests/a.txt,tests/b.txt"
|
||
|
TARGET = "/home/actions/test"
|
||
|
}
|
||
|
secrets = [
|
||
|
"HOST",
|
||
|
"USERNAME",
|
||
|
"PASSWORD",
|
||
|
]
|
||
|
}
|
||
6 years ago
|
|
||
|
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",
|
||
|
]
|
||
|
}
|
||
6 years ago
|
|
||
6 years ago
|
action "Add source in args" {
|
||
6 years ago
|
uses = "appleboy/scp-action@master"
|
||
|
env = {
|
||
|
TARGET = "/home/actions/test1234"
|
||
|
}
|
||
|
secrets = [
|
||
|
"HOST",
|
||
|
"USERNAME",
|
||
|
"KEY",
|
||
|
]
|
||
|
args = ["--source", "tests/a.txt", "--source", "tests/b.txt"]
|
||
|
}
|
||
6 years ago
|
|
||
|
action "Add secret in args" {
|
||
|
uses = "appleboy/scp-action@master"
|
||
|
env = {
|
||
|
TARGET = "/home/actions/test1234"
|
||
|
}
|
||
|
secrets = [
|
||
|
"HOST",
|
||
6 years ago
|
"TEST_USERNAME",
|
||
6 years ago
|
"KEY",
|
||
|
]
|
||
6 years ago
|
args = [
|
||
6 years ago
|
"--username", "$TEST_USERNAME",
|
||
6 years ago
|
"--source", "tests/a.txt",
|
||
|
"--source", "tests/b.txt",
|
||
|
]
|
||
6 years ago
|
}
|