mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-25 18:38:01 +00:00
opt-out rather than opt-in
This commit is contained in:
parent
9683b6d018
commit
f202749619
2 changed files with 5 additions and 4 deletions
|
@ -6,9 +6,10 @@ inputs:
|
||||||
required: true
|
required: true
|
||||||
ssh-auth-sock:
|
ssh-auth-sock:
|
||||||
description: 'Where to place the SSH Agent auth socket'
|
description: 'Where to place the SSH Agent auth socket'
|
||||||
log-public-key:
|
dont-log-public-key:
|
||||||
description: 'Whether or not to log public key fingerprints'
|
description: 'Whether or not to log public key fingerprints'
|
||||||
default: true
|
required: false
|
||||||
|
default: false
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|
4
index.js
4
index.js
|
@ -6,7 +6,7 @@ const { home, sshAgent, sshAdd } = require('./paths.js');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const privateKey = core.getInput('ssh-private-key');
|
const privateKey = core.getInput('ssh-private-key');
|
||||||
const logPublicKey = core.getBooleanInput('log-public-key');
|
const dontLogPublicKey = core.getBooleanInput('dont-log-public-key', {default: false});
|
||||||
|
|
||||||
if (!privateKey) {
|
if (!privateKey) {
|
||||||
core.setFailed("The ssh-private-key argument is empty. Maybe the secret has not been configured, or you are using a wrong secret name in your workflow file.");
|
core.setFailed("The ssh-private-key argument is empty. Maybe the secret has not been configured, or you are using a wrong secret name in your workflow file.");
|
||||||
|
@ -55,7 +55,7 @@ try {
|
||||||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
|
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
|
||||||
|
|
||||||
if (!parts) {
|
if (!parts) {
|
||||||
if (logPublicKey) {
|
if (!dontLogPublicKey) {
|
||||||
console.log(`Comment for (public) key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
|
console.log(`Comment for (public) key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue