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
{{ message }}
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -547,9 +547,9 @@ You enable GitHub Dependency Graph support by setting the `dependency-graph` act
547
547
| `generate-and-submit` | As per `generate`, but any generated dependency graph snapshots will be submitted at the end of the job. |
548
548
| `download-and-submit` | Download any previously saved dependency graph snapshots, submitting them via the Dependency Submission API. This can be useful to collect all snapshots in a matrix of builds and submit them in one step. |
549
549
550
-
Example of a simple workflow that generates and submits a dependency graph:
550
+
Example of a CI workflow that generates and submits a dependency graph:
551
551
```yaml
552
-
name: Submit dependency graph
552
+
name: CI build
553
553
on:
554
554
push:
555
555
@@ -565,11 +565,12 @@ jobs:
565
565
uses: gradle/gradle-build-action@v2
566
566
with:
567
567
dependency-graph: generate-and-submit
568
-
- name: Run a build and generate the dependencygraph which will be submitted post-job
568
+
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
569
569
run: ./gradlew build
570
570
```
571
571
572
-
The `contents: write` permission is not required to generate the dependency graph, but is required in order to submit the graph via the GitHub API. This permission will need to be explicitly enabled in the workflow file for dependency graph submission to succeed.
572
+
The `contents: write` permission is required in order to submit (but not generate) the dependency graph file.
573
+
Depending on [repository settings](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token), this permission may be available by default or may need to be explicitly enabled in the workflow file (as above).
573
574
574
575
> [!IMPORTANT]
575
576
> The above configuration will work for workflows that run as a result of commits to a repository branch,
0 commit comments