From d322577e98cd2968909aff2a84dc327c1c56371e Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 28 Sep 2019 12:16:21 +0800 Subject: [PATCH] docs: update readme --- .github/workflows/ci.yml | 9 ++++---- README.md | 49 ++++++++++++++++------------------------ 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c82a936..ad8ce0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,10 @@ jobs: - name: copy file via ssh key uses: appleboy/scp-action@master - env: - HOST: ${{ secrets.HOST }} - USERNAME: ${{ secrets.USERNAME }} - PORT: ${{ secrets.PORT }} - KEY: ${{ secrets.KEY }} with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} source: "tests/a.txt,tests/b.txt" target: "test" diff --git a/README.md b/README.md index bd2b2a6..69a1911 100644 --- a/README.md +++ b/README.md @@ -11,25 +11,30 @@ copy files and artifacts via SSH as blow. ```yaml - name: copy file via ssh password uses: appleboy/scp-action@master - env: - HOST: ${{ secrets.HOST }} - USERNAME: ${{ secrets.USERNAME }} - PASSWORD: ${{ secrets.PASSWORD }} - PORT: ${{ secrets.PORT }} with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} source: "tests/a.txt,tests/b.txt" - target: "test + target: "test" ``` -## Environment variables +## Input 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 +see the [action.yml](./action.yml) file for more detail imformation. + +* host - scp remote host +* port - scp remote port +* username - scp username +* password - scp password +* timeout - timeout for ssh to remote host +* command_timeout - timeout for scp command +* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa +* key_path - path of ssh private key +* target - target path on the server +* source - scp file list +* rm - remove target folder before upload data ### Example @@ -91,19 +96,3 @@ Example configuration for multiple server source: "tests/a.txt,tests/b.txt" target: "test" ``` - -## Input variables - -see the [action.yml](./action.yml) file for more detail imformation. - -* host - scp remote host -* port - scp remote port -* username - scp username -* password - scp password -* timeout - timeout for ssh to remote host -* command_timeout - timeout for scp command -* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa -* key_path - path of ssh private key -* target - target path on the server -* source - scp file list -* rm - remove target folder before upload data