Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit f95e9c7

Browse files
authored
Clarify dependency-graph example
1 parent 8cbcb99 commit f95e9c7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,9 @@ You enable GitHub Dependency Graph support by setting the `dependency-graph` act
547547
| `generate-and-submit` | As per `generate`, but any generated dependency graph snapshots will be submitted at the end of the job. |
548548
| `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. |
549549

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:
551551
```yaml
552-
name: Submit dependency graph
552+
name: CI build
553553
on:
554554
push:
555555
@@ -565,11 +565,12 @@ jobs:
565565
uses: gradle/gradle-build-action@v2
566566
with:
567567
dependency-graph: generate-and-submit
568-
- name: Run a build and generate the dependency graph which will be submitted post-job
568+
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
569569
run: ./gradlew build
570570
```
571571

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).
573574

574575
> [!IMPORTANT]
575576
> The above configuration will work for workflows that run as a result of commits to a repository branch,

0 commit comments

Comments
 (0)