From b4a9fbedff5eefc6329edccefb8f763be3fdfc29 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 11 May 2019 21:16:16 +0800 Subject: [PATCH] chore: add secret in args --- .github/main.workflow | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/main.workflow b/.github/main.workflow index e4eb40c..5f57392 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -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"] +}