SamKirkland / web-deploy

Deploy your website automatically for free
MIT License
186 stars 30 forks source link

Please create option to prevent the Known hosts list warning #18

Closed OpzekerIT closed 10 months ago

OpzekerIT commented 10 months ago

Bug Description Not really a bug but i want to be able to supress the :

Warning: Permanently added 'xx.xxx.xxx.xx' (ED25519) to the list of known hosts. from the output in the actions

dont have branch rights so this can be the solution:

actions.yml:

inputs: suppress-ssh-warning: description: "Set to true to suppress SSH known hosts warning" required: false default: 'false'

main:

suppress_ssh_warning: getInput("suppress-ssh-warning") === 'true'

and

(create if statement)

let sshOptions = -e 'ssh -p ${args.ssh_port} -i ${privateKeyPath} -o StrictHostKeyChecking=no'; if (args.suppress_ssh_warning) { sshOptions = -e 'ssh -p ${args.ssh_port} -i ${privateKeyPath} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR'; }

OpzekerIT commented 10 months ago

never mind, adding the secret to secrets will auto hide it in the output of actions