scp-action/.github/workflows/ci.yml

66 lines
1.1 KiB
YAML
Raw Normal View History

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 21:16:16 +08:00
"Add source in args",
"Add secret in args",
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",
]
}
2019-05-11 20:34:40 +08:00
2019-05-11 21:16:16 +08:00
action "Add source in args" {
2019-05-11 20:34:40 +08:00
uses = "appleboy/scp-action@master"
env = {
TARGET = "/home/actions/test1234"
}
secrets = [
"HOST",
"USERNAME",
"KEY",
]
args = ["--source", "tests/a.txt", "--source", "tests/b.txt"]
}
2019-05-11 21:16:16 +08:00
action "Add secret in args" {
uses = "appleboy/scp-action@master"
env = {
TARGET = "/home/actions/test1234"
}
secrets = [
"HOST",
2019-05-11 22:27:02 +08:00
"TEST_USERNAME",
2019-05-11 21:16:16 +08:00
"KEY",
]
2019-05-11 21:31:19 +08:00
args = [
2019-05-11 22:27:02 +08:00
"--username", "$TEST_USERNAME",
2019-05-11 21:31:19 +08:00
"--source", "tests/a.txt",
"--source", "tests/b.txt",
]
2019-05-11 21:16:16 +08:00
}