mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-15 15:31:44 +00:00
fix: import key
This commit is contained in:
parent
ff87f90c8e
commit
c8d9e52469
3 changed files with 39 additions and 3 deletions
19
dist/index.js
vendored
19
dist/index.js
vendored
|
|
@ -32726,9 +32726,26 @@ const verify = (filename, platform, version, verbose, failCi) => validate_awaite
|
||||||
yield (0,external_node_child_process_namespaceObject.execSync)(command);
|
yield (0,external_node_child_process_namespaceObject.execSync)(command);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
setFailure(`Codecov: Error importing pgp key: ${err.message}`, failCi);
|
setFailure(`Codecov: Error verifying gpg signature: ${err.message}`, failCi);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const importKey = () => validate_awaiter(void 0, void 0, void 0, function* () {
|
||||||
|
const command = [
|
||||||
|
'gpg',
|
||||||
|
'--logger-fd',
|
||||||
|
'1',
|
||||||
|
'--no-default-keyring',
|
||||||
|
'--import',
|
||||||
|
external_node_path_namespaceObject.join(__dirname, 'pgp_keys.asc'),
|
||||||
|
].join(' ');
|
||||||
|
try {
|
||||||
|
yield (0,external_node_child_process_namespaceObject.execSync)(command);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
setFailure(`Codecov: Error importing gpg key: ${err.message}`, failCi);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
yield importKey();
|
||||||
yield verifySignature();
|
yield verifySignature();
|
||||||
yield validateSha();
|
yield validateSha();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -89,9 +89,28 @@ const verify = async (
|
||||||
try {
|
try {
|
||||||
await execSync(command);
|
await execSync(command);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setFailure(`Codecov: Error importing pgp key: ${err.message}`, failCi);
|
setFailure(`Codecov: Error verifying gpg signature: ${err.message}`, failCi);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const importKey = async () => {
|
||||||
|
const command = [
|
||||||
|
'gpg',
|
||||||
|
'--logger-fd',
|
||||||
|
'1',
|
||||||
|
'--no-default-keyring',
|
||||||
|
'--import',
|
||||||
|
path.join(__dirname, 'pgp_keys.asc'),
|
||||||
|
].join(' ');
|
||||||
|
|
||||||
|
try {
|
||||||
|
await execSync(command);
|
||||||
|
} catch (err) {
|
||||||
|
setFailure(`Codecov: Error importing gpg key: ${err.message}`, failCi);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
await importKey();
|
||||||
await verifySignature();
|
await verifySignature();
|
||||||
await validateSha();
|
await validateSha();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue