style: improve readability and functionality across multiple components

- Remove an empty line in the jobs section
- Reformat the list of SCP options for better readability
- Reformat the list of SSH proxy settings for better readability
- Reformat the instructions for SSH login without a password for better readability

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2024-12-24 22:05:54 +08:00
parent f042d742db
commit b03d7257ae
No known key found for this signature in database

View File

@ -14,7 +14,6 @@ Copy files and artifacts via SSH:
name: scp files name: scp files
on: [push] on: [push]
jobs: jobs:
build: build:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -35,40 +34,40 @@ jobs:
See the [action.yml](./action.yml) file for more detail information. See the [action.yml](./action.yml) file for more detail information.
* host - scp remote host - host - scp remote host
* port - scp remote port, default is `22` - port - scp remote port, default is `22`
* username - scp username - username - scp username
* password - scp password - password - scp password
* passphrase - the passphrase is usually to encrypt the private key - passphrase - the passphrase is usually to encrypt the private key
* protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`. - protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`.
* fingerprint - fingerprint SHA256 of the host public key, default is to skip verification - fingerprint - fingerprint SHA256 of the host public key, default is to skip verification
* timeout - timeout for ssh to remote host, default is `30s` - timeout - timeout for ssh to remote host, default is `30s`
* command_timeout - timeout for scp command, default is `10m` - command_timeout - timeout for scp command, default is `10m`
* key - content of ssh private key. ex raw content of ~/.ssh/id_rsa - key - content of ssh private key. ex raw content of ~/.ssh/id_rsa
* key_path - path of ssh private key - key_path - path of ssh private key
* target - target path on the server, must be a directory (**required**) - target - target path on the server, must be a directory (**required**)
* source - scp file list (**required**) - source - scp file list (**required**)
* rm - remove target folder before upload data, default is `false` - rm - remove target folder before upload data, default is `false`
* strip_components - remove the specified number of leading path elements. - strip_components - remove the specified number of leading path elements.
* overwrite - use `--overwrite` flag with tar, overwrite existing files when extracting - overwrite - use `--overwrite` flag with tar, overwrite existing files when extracting
* tar_tmp_path - temporary path for tar file on the dest host - tar_tmp_path - temporary path for tar file on the dest host
* tar_exec - path to tar executable on the dest host. default is `tar` - tar_exec - path to tar executable on the dest host. default is `tar`
* tar_dereference - use `--dereference` flag with tar, follow symlinks; archive and dump the files they point to - tar_dereference - use `--dereference` flag with tar, follow symlinks; archive and dump the files they point to
* use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) - use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15))
SSH Proxy Setting: SSH Proxy Setting:
* proxy_host - proxy host - proxy_host - proxy host
* proxy_port - proxy port, default is `22` - proxy_port - proxy port, default is `22`
* proxy_username - proxy username - proxy_username - proxy username
* proxy_password - proxy password - proxy_password - proxy password
* proxy_protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`. - proxy_protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`.
* proxy_passphrase - the passphrase is usually to encrypt the private key - proxy_passphrase - the passphrase is usually to encrypt the private key
* proxy_timeout - timeout for ssh to proxy host, default is `30s` - proxy_timeout - timeout for ssh to proxy host, default is `30s`
* proxy_key - content of ssh proxy private key. - proxy_key - content of ssh proxy private key.
* proxy_key_path - path of ssh proxy private key - proxy_key_path - path of ssh proxy private key
* proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification - proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification
* proxy_use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) - proxy_use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15))
## Setting up a SSH Key ## Setting up a SSH Key
@ -108,9 +107,9 @@ See the detail information about [SSH login without password](http://www.linuxpr
**A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes: **A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes:
* Put the public key in `.ssh/authorized_keys2` - Put the public key in `.ssh/authorized_keys2`
* Change the permissions of `.ssh` to 700 - Change the permissions of `.ssh` to 700
* Change the permissions of `.ssh/authorized_keys2` to 640 - Change the permissions of `.ssh/authorized_keys2` to 640
### If you are using OpenSSH ### If you are using OpenSSH