mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
add functionality for tokenless
This commit is contained in:
5
index.js
5
index.js
@@ -50,7 +50,6 @@ try {
|
||||
};
|
||||
|
||||
options.env = {
|
||||
CODECOV_TOKEN: `${token}`,
|
||||
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||
GITHUB_REF: process.env.GITHUB_REF,
|
||||
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||||
@@ -58,6 +57,10 @@ try {
|
||||
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || ''
|
||||
};
|
||||
|
||||
if(token){
|
||||
options.env.CODECOV_TOKEN = token
|
||||
}
|
||||
|
||||
const execArgs = ["codecov.sh"];
|
||||
if (file) {
|
||||
execArgs.push(
|
||||
|
||||
Reference in New Issue
Block a user