Avoid using a separate shell

This commit is contained in:
Matthias Pigulla 2021-03-01 11:14:22 +00:00
parent f03f6e3358
commit 2bcaae34da
3 changed files with 3 additions and 9 deletions

View file

@ -59,10 +59,10 @@ jobs:
${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }}
- run: |
ssh-add -l
cat ~/.ssh/config
ls -alh ~/.ssh
git clone git@github.com:mpdude/test-2.git test-2-git
# cat ~/.ssh/config
# ls -alh ~/.ssh
# git clone https://github.com/mpdude/test-1.git test-1-http
# git clone git@github.com:mpdude/test-1.git test-1-git
# git clone ssh://git@github.com/mpdude/test-1.git test-1-git-ssh
@ -76,4 +76,4 @@ jobs:
# echo "secret-passphrase" | ssh-add ~/.ssh/5965bf89ab6e2900262e3f6802dfb4d65cb0de539d0fbb97d381e7130a4ba7e9
# ssh-add -L
# git clone git@github.com:mpdude/test-2.git test-2-git
shell: bash
# shell: bash

3
dist/index.js vendored
View file

@ -166,12 +166,9 @@ try {
const matches = /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec(lines[lineNumber])
if (matches && matches.length > 0) {
core.exportVariable(matches[1], matches[2])
process.env[matches[1]] = matches[2]; // use variables for ssh-add below
}
}
console.log(process.env);
console.log("Adding private keys to agent");
var keyNumber = 0;

View file

@ -49,12 +49,9 @@ try {
const matches = /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec(lines[lineNumber])
if (matches && matches.length > 0) {
core.exportVariable(matches[1], matches[2])
process.env[matches[1]] = matches[2]; // use variables for ssh-add below
}
}
console.log(process.env);
console.log("Adding private keys to agent");
var keyNumber = 0;