diff --git a/src/set-tokens.ts b/src/set-tokens.ts index 277e7fc0f..af6766832 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -59,8 +59,10 @@ Watch https://github.com/peaceiris/actions-gh-pages/issues/87 await exec.exec('sc', ['config', 'ssh-agent', 'start=auto']); await exec.exec('sc', ['start', 'ssh-agent']); } - await cpexec('ssh-agent', ['-a', '/tmp/ssh-auth.sock']); - core.exportVariable('SSH_AUTH_SOCK', '/tmp/ssh-auth.sock'); + const socketPath = `/tmp/ssh-auth.actions-gh-pages.${Math.random().toString().slice(2)}.sock`; + core.info(`[INFO] acquiring socket with path: ${socketPath}`); + await cpexec('ssh-agent', ['-a', socketPath]); + core.exportVariable('SSH_AUTH_SOCK', socketPath); await exec.exec('ssh-add', [idRSA]); return `git@${getServerUrl().host}:${publishRepo}.git`;