You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-32Lines changed: 44 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -64,44 +64,56 @@ steps:
64
64
> [!NOTE]
65
65
> This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io). Keep in mind that secrets are *not* available to forks of repositories.
66
66
67
+
### Using OIDC
68
+
For users with [OpenID Connect(OIDC) enabled](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect), the Codecov token is not necessary. You can use OIDC with the `use_oidc` argument as following.
69
+
70
+
```yaml
71
+
- uses: codecov/codecov-action@v4
72
+
with:
73
+
use_oidc: true
74
+
```
75
+
76
+
Any token supplied will be ignored, as Codecov will default to the OIDC token for verification.
77
+
67
78
## Arguments
68
79
69
80
Codecov's Action supports inputs from the user. These inputs, along with their descriptions and usage contexts, are listed in the table below:
70
81
71
82
| Input | Description | Required |
72
83
| :--- | :--- | :---: |
73
-
| `token` | Repository Codecov token. Used to authorize report uploads | *Required
74
-
| `codecov_yml_path` | Specify the path to the Codecov YML | Optional
75
-
| `commit_parent` | Override to specify the parent commit SHA | Optional
76
-
| `directory` | Directory to search for coverage reports. | Optional
77
-
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option. | Optional
78
-
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets) | Optional
79
-
| `dry_run` | Don't upload files to Codecov | Optional
80
-
| `env_vars` | Environment variables to tag the upload with (e.g. PYTHON \| OS,PYTHON) | Optional
81
-
| `exclude` | Folders to exclude from search | Optional
82
-
| `fail_ci_if_error` | Specify whether or not CI build should fail if Codecov runs into an error during upload | Optional
83
-
| `file` | Path to coverage file to upload | Optional
84
-
| `files` | Comma-separated list of files to upload | Optional
85
-
| `flags` | Flag upload to group coverage metrics (e.g. unittests \| integration \| ui,chrome) | Optional
86
-
| `handle_no_reports_found` | Raise no exceptions when no coverage reports found | Optional
87
-
| `job_code` | The job code | Optional
88
-
| `name` | User defined upload name. Visible in Codecov UI | Optional
89
-
| `os` | Override the assumed OS. Options are linux \| macos \| windows \| . | Optional
90
-
| `override_branch` | Specify the branch name | Optional
91
-
| `override_build` | Specify the build number | Optional
92
-
| `override_build_url` | The URL of the build where this is running | Optional
93
-
| `override_commit` | Specify the commit SHA | Optional
94
-
| `override_pr` | Specify the pull request number | Optional
95
-
| `plugin` | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
96
-
| `plugins` | Comma-separated list of plugins for use during upload. | Optional
97
-
| `report_code` | The code of the report. If unsure, do not include | Optional
98
-
| `root_dir` | Used to specify the location of your .git root to identify project root directory | Optional
| `url` | Specify the base url to upload (Enterprise use) | Optional
101
-
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint | Optional
102
-
| `verbose` | Specify whether the Codecov output should be verbose | Optional
103
-
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
104
-
| `working-directory` | Directory in which to execute codecov.sh | Optional
84
+
| `token` | Repository Codecov token. Used to authorize report uploads | *Required
85
+
| `codecov_yml_path` | Specify the path to the Codecov YML | Optional
86
+
| `commit_parent` | Override to specify the parent commit SHA | Optional
87
+
| `directory` | Directory to search for coverage reports. | Optional
88
+
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option. | Optional
89
+
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets) | Optional
90
+
| `dry_run` | Don't upload files to Codecov | Optional
91
+
| `env_vars` | Environment variables to tag the upload with (e.g. PYTHON \| OS,PYTHON) | Optional
92
+
| `exclude` | Folders to exclude from search | Optional
93
+
| `fail_ci_if_error` | Specify whether or not CI build should fail if Codecov runs into an error during upload | Optional
94
+
| `file` | Path to coverage file to upload | Optional
95
+
| `files` | Comma-separated list of files to upload | Optional
96
+
| `flags` | Flag upload to group coverage metrics (e.g. unittests \| integration \| ui,chrome) | Optional
97
+
| `handle_no_reports_found` | Raise no exceptions when no coverage reports found | Optional
98
+
| `job_code` | The job code | Optional
99
+
| `name` | User defined upload name. Visible in Codecov UI | Optional
100
+
| `os` | Override the assumed OS. Options are linux \| macos \| windows \| . | Optional
101
+
| `override_branch` | Specify the branch name | Optional
102
+
| `override_build` | Specify the build number | Optional
103
+
| `override_build_url` | The URL of the build where this is running | Optional
104
+
| `override_commit` | Specify the commit SHA | Optional
105
+
| `override_pr` | Specify the pull request number | Optional
106
+
| `plugin` | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
107
+
| `plugins` | Comma-separated list of plugins for use during upload. | Optional
108
+
| `report_code` | The code of the report. If unsure, do not include | Optional
109
+
| `root_dir` | Used to specify the location of your .git root to identify project root directory | Optional
| `url` | Specify the base url to upload (Enterprise use) | Optional
112
+
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint | Optional
113
+
| `use_oidc` | Use OpenID Connect for verification instead of token. This will ignore any token supplied. Please see [GitHub documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) for details.
114
+
| `verbose` | Specify whether the Codecov output should be verbose | Optional
115
+
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
116
+
| `working-directory` | Directory in which to execute codecov.sh | Optional
0 commit comments