Skip to content

Commit

Permalink
fix: pull gpg key from keybase
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Mar 7, 2024
1 parent 54bcd87 commit a873fd5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 57 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32685,12 +32685,13 @@ const verify = (filename, platform, version, verbose, failCi) => validate_awaite
}));
};
// Import gpg key
gpg.call('', [
const pgpKeyRes = yield (0,undici.request)('https://keybase.io/codecovsecurity/pgp_keys.asc');
const pgpKey = yield pgpKeyRes.body.text();
gpg.call(pgpKey, [
'--logger-fd',
'1',
'--no-default-keyring',
'--import',
__nccwpck_require__.ab + "pgp_keys.asc",
], (err, importResult) => validate_awaiter(void 0, void 0, void 0, function* () {
if (err) {
setFailure('Codecov: Error importing pgp key', failCi);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

52 changes: 0 additions & 52 deletions src/pgp_keys.asc

This file was deleted.

7 changes: 5 additions & 2 deletions src/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,15 @@ const verify = async (
};

// Import gpg key
gpg.call('', [
const pgpKeyRes = await request(
'https://keybase.io/codecovsecurity/pgp_keys.asc',
);
const pgpKey = await pgpKeyRes.body.text();
gpg.call(pgpKey, [
'--logger-fd',
'1',
'--no-default-keyring',
'--import',
path.join(__dirname, 'pgp_keys.asc'),
], async (err, importResult) => {
if (err) {
setFailure('Codecov: Error importing pgp key', failCi);
Expand Down

0 comments on commit a873fd5

Please sign in to comment.