chore: add secret in args

This commit is contained in:
Bo-Yi Wu 2019-05-11 21:16:16 +08:00
parent 9f07126ae4
commit b4a9fbedff
1 changed files with 15 additions and 2 deletions

17
.github/main.workflow vendored
View File

@ -3,7 +3,8 @@ workflow "Copy File Via SSH" {
resolves = [
"Copy file via ssh password",
"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"
env = {
TARGET = "/home/actions/test1234"
@ -45,3 +46,15 @@ action "Add source in command" {
]
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"]
}