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