fix: remove token and tokenless this

This commit is contained in:
Tom Hu 2024-05-23 00:40:58 +07:00
parent a1504ae490
commit 1649099795
No known key found for this signature in database
GPG key ID: 79155678363963D2
4 changed files with 11 additions and 26 deletions

View file

@ -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
@ -23,7 +27,6 @@ jobs:
flags: script,${{ matrix.os }} flags: script,${{ matrix.os }}
name: codecov-script name: codecov-script
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (demo) - name: Upload coverage to Codecov (demo)
uses: ./ uses: ./
with: with:
@ -33,7 +36,6 @@ jobs:
flags: demo,${{ matrix.os }} flags: demo,${{ matrix.os }}
name: codecov-demo name: codecov-demo
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (version) - name: Upload coverage to Codecov (version)
uses: ./ uses: ./
with: with:
@ -87,7 +89,6 @@ jobs:
name: codecov-version name: codecov-version
version: v0.6.0 version: v0.6.0
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
run-container: run-container:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -108,7 +109,6 @@ jobs:
flags: script,${{ matrix.os }} flags: script,${{ matrix.os }}
name: codecov-script name: codecov-script
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (demo) - name: Upload coverage to Codecov (demo)
uses: ./ uses: ./
with: with:
@ -117,7 +117,6 @@ jobs:
flags: demo,${{ matrix.os }} flags: demo,${{ matrix.os }}
name: codecov-demo name: codecov-demo
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (version) - name: Upload coverage to Codecov (version)
uses: ./ uses: ./
with: with:
@ -127,4 +126,3 @@ jobs:
name: codecov-version name: codecov-version
version: v0.6.0 version: v0.6.0
verbose: true verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

12
dist/index.js vendored
View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -98,10 +98,7 @@ const buildCommitExec = async (): Promise<{
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '', GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
}); });
commitOptions.env.CODECOV_TOKEN = token;
if (token) {
commitOptions.env.CODECOV_TOKEN = token;
}
if (commitParent) { if (commitParent) {
commitExecArgs.push('--parent-sha', `${commitParent}`); commitExecArgs.push('--parent-sha', `${commitParent}`);
} }
@ -188,9 +185,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 +280,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');
} }