mirror of
https://github.com/Burnett01/rsync-deployments.git
synced 2026-11-19 21:45:24 +08:00
feat: new input for dynamic LOG_LEVEL
You can now control the ssh log-level that is passed via the rsh switch for better logging control. The default log-level is ERROR (previously it was not set, hence it fallback to INFO). This further enhances masking when strict_hostkeys_checking is false (default=false), by hiding the warning message. Github already always masked the host but the algo was still visible. Before: "Warning: Permanently added '***' (ED25519) to the list of known hosts." After: hidden (when log_level ERROR, which is the default) As always, we encourage you to enable strict_hostkeys_checking = true, in order to make a hostkey known to the action beforehand.
This commit is contained in:
+4
-1
@@ -2,8 +2,11 @@
|
||||
|
||||
set -eu
|
||||
|
||||
LOG_LEVEL="${INPUT_LOGLEVEL:-ERROR}"
|
||||
|
||||
if [ "${INPUT_DEBUG:-false}" = "true" ]; then
|
||||
set -x
|
||||
LOG_LEVEL=""
|
||||
fi
|
||||
|
||||
if [ -z "$(echo "$INPUT_REMOTE_PATH" | awk '{$1=$1};1')" ]; then
|
||||
@@ -41,7 +44,7 @@ if [ "${INPUT_STRICT_HOSTKEYS_CHECKING:-false}" = "true" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
RSH="ssh $STRICT_HOSTKEYS_CHECKING $LEGACY_RSA_HOSTKEYS -p $INPUT_REMOTE_PORT $INPUT_RSH"
|
||||
RSH="ssh $LOG_LEVEL $STRICT_HOSTKEYS_CHECKING $LEGACY_RSA_HOSTKEYS -p $INPUT_REMOTE_PORT $INPUT_RSH"
|
||||
LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH"
|
||||
DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user