mirror of
https://github.com/webfactory/ssh-agent.git
synced 2026-03-16 08:19:06 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb8b21017a | ||
|
|
aed5400f20 | ||
|
|
4681241867 |
@@ -33,9 +33,9 @@ jobs:
|
||||
...
|
||||
steps:
|
||||
- actions/checkout@v2
|
||||
# Make sure the @v0.5.1 matches the current version of the
|
||||
# Make sure the @v0.5.2 matches the current version of the
|
||||
# action
|
||||
- uses: webfactory/ssh-agent@v0.5.1
|
||||
- uses: webfactory/ssh-agent@v0.5.2
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
- ... other steps
|
||||
@@ -50,7 +50,7 @@ You can set up different keys as different secrets and pass them all to the acti
|
||||
|
||||
```yaml
|
||||
# ... contens as before
|
||||
- uses: webfactory/ssh-agent@v0.5.1
|
||||
- uses: webfactory/ssh-agent@v0.5.2
|
||||
with:
|
||||
ssh-private-key: |
|
||||
${{ secrets.FIRST_KEY }}
|
||||
|
||||
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -167,9 +167,11 @@ try {
|
||||
console.log('Configuring deployment key(s)');
|
||||
|
||||
child_process.execFileSync(sshAdd, ['-L']).toString().split(/\r?\n/).forEach(function(key) {
|
||||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/);
|
||||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
|
||||
|
||||
if (!parts) {
|
||||
console.log(`Comment for key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
4
index.js
4
index.js
@@ -50,9 +50,11 @@ try {
|
||||
console.log('Configuring deployment key(s)');
|
||||
|
||||
child_process.execFileSync(sshAdd, ['-L']).toString().split(/\r?\n/).forEach(function(key) {
|
||||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/);
|
||||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
|
||||
|
||||
if (!parts) {
|
||||
console.log(`Comment for key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user