chore: add secret in args

这个提交包含在:
Bo-Yi Wu
2019-05-11 21:16:16 +08:00
父节点 9f07126ae4
当前提交 b4a9fbedff

17
.github/main.workflow vendored
查看文件

@ -3,7 +3,8 @@ workflow "Copy File Via SSH" {
resolves = [ resolves = [
"Copy file via ssh password", "Copy file via ssh password",
"Copy file via ssh key", "Copy file via ssh key",
"Add source in command", "Add source in args",
"Add secret in args",
] ]
} }
@ -33,7 +34,7 @@ action "Copy file via ssh key" {
] ]
} }
action "Add source in command" { action "Add source in args" {
uses = "appleboy/scp-action@master" uses = "appleboy/scp-action@master"
env = { env = {
TARGET = "/home/actions/test1234" TARGET = "/home/actions/test1234"
@ -45,3 +46,15 @@ action "Add source in command" {
] ]
args = ["--source", "tests/a.txt", "--source", "tests/b.txt"] 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",
"KEY",
]
args = ["--username", "$USERNAME", "--source", "tests/a.txt", "--source", "tests/b.txt"]
}