mirror of
https://github.com/appleboy/scp-action.git
synced 2024-12-19 22:09:05 +00:00
docs: update readme
This commit is contained in:
parent
c73f1d85aa
commit
64c8a87402
54
README.md
54
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
|
### Example
|
||||||
|
|
||||||
|
Copy file via ssh password
|
||||||
|
|
||||||
```
|
```
|
||||||
action "Copy multiple file" {
|
action "Copy multiple file" {
|
||||||
uses = "appleboy/scp-action@master"
|
uses = "appleboy/scp-action@master"
|
||||||
env = {
|
env = {
|
||||||
HOST = "example.com"
|
HOST = "example.com"
|
||||||
USERNAME = "foo"
|
USERNAME = "foo"
|
||||||
PASSWORD = "bar"
|
|
||||||
PORT = "22"
|
PORT = "22"
|
||||||
SOURCE = "tests/a.txt,tests/b.txt"
|
SOURCE = "tests/a.txt,tests/b.txt"
|
||||||
TARGET = "/home/foo/test"
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user