Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): restrict scorecards to codecov/codecov-action #1512

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions: read-all

jobs:
analysis:
if: github.repository == 'codecov/codecov-action'
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
Expand All @@ -21,7 +22,7 @@ jobs:
id-token: write
actions: read
contents: read

steps:
- name: "Checkout code"
uses: actions/checkout@v4.1.7 # v3.0.0
Expand All @@ -40,8 +41,8 @@ jobs:
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}

# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true

Expand All @@ -53,7 +54,7 @@ jobs:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3.25.12 # v1.0.26
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32351,12 +32351,12 @@ const isPullRequestFromFork = () => {
return (baseLabel.split(':')[0] !== headLabel.split(':')[0]);
};
const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
if (isPullRequestFromFork()) {
let token = core.getInput('token');
if (!token && isPullRequestFromFork()) {
core.info('==> Fork detected, tokenless uploading used');
process.env['TOKENLESS'] = context.payload.pull_request.head.label;
return Promise.resolve('');
}
let token = core.getInput('token');
let url = core.getInput('url');
const useOIDC = isTrue(core.getInput('use_oidc'));
if (useOIDC) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading