scp-action/.github/workflows/ci.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 1: cannot unmarshal !!str `workflo...` into model.Workflow
2019-09-28 10:32:00 +08:00

66 lines
1.1 KiB
YAML

workflow "Copy File Via SSH" {
on = "push"
resolves = [
"Copy file via ssh password",
"Copy file via ssh key",
"Add source in args",
"Add secret in args",
]
}
action "Copy file via ssh password" {
uses = "appleboy/scp-action@master"
env = {
SOURCE = "tests/a.txt,tests/b.txt"
TARGET = "/home/actions/test"
}
secrets = [
"HOST",
"USERNAME",
"PASSWORD",
]
}
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",
]
}
action "Add source in args" {
uses = "appleboy/scp-action@master"
env = {
TARGET = "/home/actions/test1234"
}
secrets = [
"HOST",
"USERNAME",
"KEY",
]
args = ["--source", "tests/a.txt", "--source", "tests/b.txt"]
}
action "Add secret in args" {
uses = "appleboy/scp-action@master"
env = {
TARGET = "/home/actions/test1234"
}
secrets = [
"HOST",
"TEST_USERNAME",
"KEY",
]
args = [
"--username", "$TEST_USERNAME",
"--source", "tests/a.txt",
"--source", "tests/b.txt",
]
}