mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-16 07:51:46 +00:00
chore(log): dump context
This commit is contained in:
parent
dad251dcaf
commit
ae7230e0f1
4 changed files with 28 additions and 25 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
|
@ -9,6 +9,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.4
|
uses: actions/checkout@v4.1.4
|
||||||
|
- name: Dump GitHub context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
|
|
||||||
46
dist/index.js
vendored
46
dist/index.js
vendored
|
|
@ -32440,12 +32440,12 @@ var __webpack_exports__ = {};
|
||||||
// ESM COMPAT FLAG
|
// ESM COMPAT FLAG
|
||||||
__nccwpck_require__.r(__webpack_exports__);
|
__nccwpck_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
// EXTERNAL MODULE: external "fs"
|
;// CONCATENATED MODULE: external "node:fs"
|
||||||
var external_fs_ = __nccwpck_require__(7147);
|
const external_node_fs_namespaceObject = require("node:fs");
|
||||||
// EXTERNAL MODULE: external "https"
|
;// CONCATENATED MODULE: external "node:https"
|
||||||
var external_https_ = __nccwpck_require__(5687);
|
const external_node_https_namespaceObject = require("node:https");
|
||||||
// EXTERNAL MODULE: external "path"
|
;// CONCATENATED MODULE: external "node:path"
|
||||||
var external_path_ = __nccwpck_require__(1017);
|
const external_node_path_namespaceObject = require("node:path");
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
|
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
|
||||||
var exec = __nccwpck_require__(1514);
|
var exec = __nccwpck_require__(1514);
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||||
|
|
@ -32863,8 +32863,8 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// EXTERNAL MODULE: external "crypto"
|
;// CONCATENATED MODULE: external "node:crypto"
|
||||||
var external_crypto_ = __nccwpck_require__(6113);
|
const external_node_crypto_namespaceObject = require("node:crypto");
|
||||||
// EXTERNAL MODULE: ./node_modules/gpg/lib/gpg.js
|
// EXTERNAL MODULE: ./node_modules/gpg/lib/gpg.js
|
||||||
var gpg = __nccwpck_require__(40);
|
var gpg = __nccwpck_require__(40);
|
||||||
// EXTERNAL MODULE: ./node_modules/undici/index.js
|
// EXTERNAL MODULE: ./node_modules/undici/index.js
|
||||||
|
|
@ -32896,24 +32896,24 @@ const verify = (filename, platform, version, verbose, failCi) => validate_awaite
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log(`Received SHA256SUM ${shasum}`);
|
console.log(`Received SHA256SUM ${shasum}`);
|
||||||
}
|
}
|
||||||
yield external_fs_.writeFileSync(external_path_.join(__dirname, `${uploaderName}.SHA256SUM`), shasum);
|
yield external_node_fs_namespaceObject.writeFileSync(external_node_path_namespaceObject.join(__dirname, `${uploaderName}.SHA256SUM`), shasum);
|
||||||
const shaSigRes = yield (0,undici.request)(`${getBaseUrl(platform, version)}.SHA256SUM.sig`);
|
const shaSigRes = yield (0,undici.request)(`${getBaseUrl(platform, version)}.SHA256SUM.sig`);
|
||||||
const shaSig = yield shaSigRes.body.text();
|
const shaSig = yield shaSigRes.body.text();
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log(`Received SHA256SUM signature ${shaSig}`);
|
console.log(`Received SHA256SUM signature ${shaSig}`);
|
||||||
}
|
}
|
||||||
yield external_fs_.writeFileSync(external_path_.join(__dirname, `${uploaderName}.SHA256SUM.sig`), shaSig);
|
yield external_node_fs_namespaceObject.writeFileSync(external_node_path_namespaceObject.join(__dirname, `${uploaderName}.SHA256SUM.sig`), shaSig);
|
||||||
const validateSha = () => validate_awaiter(void 0, void 0, void 0, function* () {
|
const validateSha = () => validate_awaiter(void 0, void 0, void 0, function* () {
|
||||||
const calculateHash = (filename) => validate_awaiter(void 0, void 0, void 0, function* () {
|
const calculateHash = (filename) => validate_awaiter(void 0, void 0, void 0, function* () {
|
||||||
const stream = external_fs_.createReadStream(filename);
|
const stream = external_node_fs_namespaceObject.createReadStream(filename);
|
||||||
const uploaderSha = external_crypto_.createHash(`sha256`);
|
const uploaderSha = external_node_crypto_namespaceObject.createHash(`sha256`);
|
||||||
stream.pipe(uploaderSha);
|
stream.pipe(uploaderSha);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
stream.on('end', () => resolve(`${uploaderSha.digest('hex')} ${uploaderName}`));
|
stream.on('end', () => resolve(`${uploaderSha.digest('hex')} ${uploaderName}`));
|
||||||
stream.on('error', reject);
|
stream.on('error', reject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const hash = yield calculateHash(external_path_.join(__dirname, `${uploaderName}`));
|
const hash = yield calculateHash(external_node_path_namespaceObject.join(__dirname, `${uploaderName}`));
|
||||||
if (hash === shasum) {
|
if (hash === shasum) {
|
||||||
core.info(`==> Uploader SHASUM verified (${hash})`);
|
core.info(`==> Uploader SHASUM verified (${hash})`);
|
||||||
}
|
}
|
||||||
|
|
@ -32927,11 +32927,11 @@ const verify = (filename, platform, version, verbose, failCi) => validate_awaite
|
||||||
'--logger-fd',
|
'--logger-fd',
|
||||||
'1',
|
'1',
|
||||||
'--verify',
|
'--verify',
|
||||||
external_path_.join(__dirname, `${uploaderName}.SHA256SUM.sig`),
|
external_node_path_namespaceObject.join(__dirname, `${uploaderName}.SHA256SUM.sig`),
|
||||||
external_path_.join(__dirname, `${uploaderName}.SHA256SUM`),
|
external_node_path_namespaceObject.join(__dirname, `${uploaderName}.SHA256SUM`),
|
||||||
], (err, verifyResult) => validate_awaiter(void 0, void 0, void 0, function* () {
|
], (err, verifyResult) => validate_awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (err) {
|
if (err) {
|
||||||
setFailure('Codecov: Error importing pgp key', failCi);
|
setFailure(`Codecov: Error importing pgp key: ${err.message}`, failCi);
|
||||||
}
|
}
|
||||||
core.info(verifyResult);
|
core.info(verifyResult);
|
||||||
yield validateSha();
|
yield validateSha();
|
||||||
|
|
@ -32943,10 +32943,10 @@ const verify = (filename, platform, version, verbose, failCi) => validate_awaite
|
||||||
'1',
|
'1',
|
||||||
'--no-default-keyring',
|
'--no-default-keyring',
|
||||||
'--import',
|
'--import',
|
||||||
__nccwpck_require__.ab + "pgp_keys.asc",
|
external_node_path_namespaceObject.join(__dirname, 'pgp_keys.asc'),
|
||||||
], (err, importResult) => validate_awaiter(void 0, void 0, void 0, function* () {
|
], (err, importResult) => validate_awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (err) {
|
if (err) {
|
||||||
setFailure('Codecov: Error importing pgp key', failCi);
|
setFailure(`Codecov: Error importing pgp key: ${err.message}`, failCi);
|
||||||
}
|
}
|
||||||
core.info(importResult);
|
core.info(importResult);
|
||||||
verifySignature();
|
verifySignature();
|
||||||
|
|
@ -33011,10 +33011,10 @@ const run = () => src_awaiter(void 0, void 0, void 0, function* () {
|
||||||
const { uploadExecArgs, uploadOptions, disableSafeDirectory, failCi, os, uploaderVersion, uploadCommand, } = yield buildUploadExec();
|
const { uploadExecArgs, uploadOptions, disableSafeDirectory, failCi, os, uploaderVersion, uploadCommand, } = yield buildUploadExec();
|
||||||
const { args, verbose } = buildGeneralExec();
|
const { args, verbose } = buildGeneralExec();
|
||||||
const platform = getPlatform(os);
|
const platform = getPlatform(os);
|
||||||
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
const filename = external_node_path_namespaceObject.join(__dirname, getUploaderName(platform));
|
||||||
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
external_node_https_namespaceObject.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
const filePath = external_fs_.createWriteStream(filename);
|
const filePath = external_node_fs_namespaceObject.createWriteStream(filename);
|
||||||
res.pipe(filePath);
|
res.pipe(filePath);
|
||||||
filePath
|
filePath
|
||||||
.on('error', (err) => {
|
.on('error', (err) => {
|
||||||
|
|
@ -33023,12 +33023,12 @@ const run = () => src_awaiter(void 0, void 0, void 0, function* () {
|
||||||
filePath.close();
|
filePath.close();
|
||||||
yield validate(filename, platform, uploaderVersion, verbose, failCi);
|
yield validate(filename, platform, uploaderVersion, verbose, failCi);
|
||||||
yield version(platform, uploaderVersion);
|
yield version(platform, uploaderVersion);
|
||||||
yield external_fs_.chmodSync(filename, '777');
|
yield external_node_fs_namespaceObject.chmodSync(filename, '777');
|
||||||
if (!disableSafeDirectory) {
|
if (!disableSafeDirectory) {
|
||||||
yield setSafeDirectory();
|
yield setSafeDirectory();
|
||||||
}
|
}
|
||||||
const unlink = () => {
|
const unlink = () => {
|
||||||
external_fs_.unlink(filename, (err) => {
|
external_node_fs_namespaceObject.unlink(filename, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
setFailure(`Codecov: Could not unlink uploader: ${err.message}`, failCi);
|
setFailure(`Codecov: Could not unlink uploader: ${err.message}`, failCi);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -33,7 +33,6 @@ const getToken = async (): Promise<string> => {
|
||||||
let token = core.getInput('token');
|
let token = core.getInput('token');
|
||||||
let url = core.getInput('url');
|
let url = core.getInput('url');
|
||||||
const useOIDC = isTrue(core.getInput('use_oidc'));
|
const useOIDC = isTrue(core.getInput('use_oidc'));
|
||||||
|
|
||||||
if (useOIDC) {
|
if (useOIDC) {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
url = 'https://codecov.io';
|
url = 'https://codecov.io';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue