mirror of
https://github.com/webfactory/ssh-agent.git
synced 2025-06-28 05:33:45 +00:00
Express logging flag in a "positive" way, not as "do not log"
This commit is contained in:
parent
b5b046356c
commit
3d2f9b9e54
3 changed files with 6 additions and 6 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -326,7 +326,7 @@ const { home, sshAgent, sshAdd } = __webpack_require__(972);
|
|||
|
||||
try {
|
||||
const privateKey = core.getInput('ssh-private-key');
|
||||
const dontLogPublicKey = core.getBooleanInput('dont-log-public-key', {default: false});
|
||||
const logPublicKey = core.getBooleanInput('log-public-key', {default: true});
|
||||
|
||||
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.");
|
||||
|
@ -375,7 +375,7 @@ try {
|
|||
const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i);
|
||||
|
||||
if (!parts) {
|
||||
if (!dontLogPublicKey) {
|
||||
if (logPublicKey) {
|
||||
console.log(`Comment for (public) key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue