Trust resolved deploy host addresses
All checks were successful
Publish Hugo Deployment Image / publish (push) Successful in 30s
All checks were successful
Publish Hugo Deployment Image / publish (push) Successful in 30s
This commit is contained in:
parent
5c437bae74
commit
7186257987
1 changed files with 7 additions and 1 deletions
|
|
@ -84,7 +84,13 @@ jobs:
|
|||
if [[ -n "${DEPLOY_KNOWN_HOSTS:-}" ]]; then
|
||||
printf '%s\n' "$DEPLOY_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
|
||||
else
|
||||
ssh-keyscan -H -p "${DEPLOY_SSH_PORT:-22}" "${DEPLOY_SSH_HOST}" > "$HOME/.ssh/known_hosts"
|
||||
{
|
||||
ssh-keyscan -H -p "${DEPLOY_SSH_PORT:-22}" "${DEPLOY_SSH_HOST}"
|
||||
getent ahosts "${DEPLOY_SSH_HOST}" \
|
||||
| awk '{ print $1 }' \
|
||||
| sort -u \
|
||||
| xargs -r -n1 ssh-keyscan -H -p "${DEPLOY_SSH_PORT:-22}"
|
||||
} > "$HOME/.ssh/known_hosts"
|
||||
fi
|
||||
chmod 0600 "$HOME/.ssh/known_hosts"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue