fix: absent SSH_AUTHORIZED_KEY does not cause failure
continuous-integration/drone/push Build is passing Details

api-3.0
Alexander 2023-12-28 20:00:44 +04:00
parent 4920434aec
commit 15f36551ad
1 changed files with 3 additions and 3 deletions

View File

@ -30,9 +30,11 @@ readonly NIX_OPTS=(--extra-experimental-features "nix-command flakes")
DoNetConf=
genOptionalSsh() {
[ -n "${SSH_AUTHORIZED_KEY}" ] && cat << EOF
if [ -n "${SSH_AUTHORIZED_KEY}" ]; then
cat << EOF
"ssh": { "rootKeys": [ "${SSH_AUTHORIZED_KEY}" ] },
EOF
fi
}
# TODO receive disk device path from outside
@ -528,8 +530,6 @@ set -o xtrace
shopt -s inherit_errexit
trap 'echo ${LINENO}: "$BASH_COMMAND"; exit 1' ERR
genNetworkingConf
# digitalocean requires detailed network config to be generated
[ "$PROVIDER" == "digitalocean" ] && DoNetConf="y"