mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-10 04:57:24 +00:00
fix: set token automatically
This commit is contained in:
parent
a05a16bd04
commit
7289938827
4 changed files with 11 additions and 19 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
|
@ -7,6 +7,10 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Dump GitHub context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.6
|
uses: actions/checkout@v4.1.6
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
|
||||||
12
dist/index.js
vendored
12
dist/index.js
vendored
|
|
@ -32393,9 +32393,7 @@ const buildCommitExec = () => buildExec_awaiter(void 0, void 0, void 0, function
|
||||||
GITHUB_SHA: process.env.GITHUB_SHA,
|
GITHUB_SHA: process.env.GITHUB_SHA,
|
||||||
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||||||
});
|
});
|
||||||
if (token) {
|
commitOptions.env.CODECOV_TOKEN = token;
|
||||||
commitOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
if (commitParent) {
|
if (commitParent) {
|
||||||
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
||||||
}
|
}
|
||||||
|
|
@ -32462,9 +32460,7 @@ const buildReportExec = () => buildExec_awaiter(void 0, void 0, void 0, function
|
||||||
GITHUB_SHA: process.env.GITHUB_SHA,
|
GITHUB_SHA: process.env.GITHUB_SHA,
|
||||||
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||||||
});
|
});
|
||||||
if (token) {
|
reportOptions.env.CODECOV_TOKEN = token;
|
||||||
reportOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
reportExecArgs.push('--git-service', `${gitService}`);
|
reportExecArgs.push('--git-service', `${gitService}`);
|
||||||
if (overrideCommit) {
|
if (overrideCommit) {
|
||||||
reportExecArgs.push('-C', `${overrideCommit}`);
|
reportExecArgs.push('-C', `${overrideCommit}`);
|
||||||
|
|
@ -32542,9 +32538,7 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
|
||||||
envVarsArg.push(envVarClean);
|
envVarsArg.push(envVarClean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (token) {
|
uploadOptions.env.CODECOV_TOKEN = token;
|
||||||
uploadOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
if (disableFileFixes) {
|
if (disableFileFixes) {
|
||||||
uploadExecArgs.push('--disable-file-fixes');
|
uploadExecArgs.push('--disable-file-fixes');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -99,9 +99,7 @@ const buildCommitExec = async (): Promise<{
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (token) {
|
commitOptions.env.CODECOV_TOKEN = token;
|
||||||
commitOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
if (commitParent) {
|
if (commitParent) {
|
||||||
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
||||||
}
|
}
|
||||||
|
|
@ -188,9 +186,7 @@ const buildReportExec = async (): Promise<{
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (token) {
|
reportOptions.env.CODECOV_TOKEN = token;
|
||||||
reportOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
reportExecArgs.push('--git-service', `${gitService}`);
|
reportExecArgs.push('--git-service', `${gitService}`);
|
||||||
|
|
||||||
if (overrideCommit) {
|
if (overrideCommit) {
|
||||||
|
|
@ -285,9 +281,7 @@ const buildUploadExec = async (): Promise<{
|
||||||
envVarsArg.push(envVarClean);
|
envVarsArg.push(envVarClean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (token) {
|
uploadOptions.env.CODECOV_TOKEN = token;
|
||||||
uploadOptions.env.CODECOV_TOKEN = token;
|
|
||||||
}
|
|
||||||
if (disableFileFixes) {
|
if (disableFileFixes) {
|
||||||
uploadExecArgs.push('--disable-file-fixes');
|
uploadExecArgs.push('--disable-file-fixes');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue