From 64c8a8740220df767439388b59ee7fde175fe81d Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 11 May 2019 19:49:38 +0800 Subject: [PATCH] docs: update readme --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0146630..499dd2a 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,26 @@ action "Copy multiple file" { } ``` +## Environment variables + +* HOST - ssh server host +* PORT - ssh server port +* USERNAME - ssh server username +* PASSWORD - ssh server password +* KEY - ssh server private key +* TARGET - target folder +* SOURCE - scp file list + ### Example +Copy file via ssh password + ``` action "Copy multiple file" { uses = "appleboy/scp-action@master" env = { HOST = "example.com" USERNAME = "foo" - PASSWORD = "bar" PORT = "22" SOURCE = "tests/a.txt,tests/b.txt" TARGET = "/home/foo/test" @@ -43,3 +54,44 @@ action "Copy multiple file" { ] } ``` + +Copy file via ssh key + +``` +action "Copy file via ssh key" { + uses = "appleboy/scp-action@master" + env = { + HOST = "example.com" + USERNAME = "foo" + PORT = "22" + SOURCE = "tests/c.txt,tests/d.txt" + TARGET = "/home/actions/test" + } + secrets = [ + "KEY", + ] +} +``` + +Example configuration for ignore list: + +``` +action "reqular expression list" { + uses = "appleboy/scp-action@master" + env = { + HOST = "example.com" + USERNAME = "foo" + PORT = "22" + SOURCE = "tests/*.txt,!tests/a.txt" + TARGET = "/home/actions/test" + } + secrets = [ + "KEY", + ] +} +``` + +## Secrets + +* `PASSWORD` - ssh server password +* `KEY` - ssh server private key