diff --git a/lib/run.js b/lib/run.js index 015a4e6..19dc8e6 100644 --- a/lib/run.js +++ b/lib/run.js @@ -37,9 +37,10 @@ function decrypt_key(deploy_key, enc_rsa_key_pth, options) { yield runner1.exec(); const authSock = '/tmp/ssh-auth.sock' - const runner2 = new toolrunner.ToolRunner('ssh-agent', ['-a', authSock]); - yield runner2.exec(); - + if (!fs.existsSync(authSock)) { + const runner2 = new toolrunner.ToolRunner('ssh-agent', ['-a', authSock]); + yield runner2.exec(); + } core.exportVariable('SSH_AUTH_SOCK', authSock); const runner3 = new toolrunner.ToolRunner('ssh-add', ['config/deploy_id_rsa'], options); yield runner3.exec();