Skip to content

Commit d211a39

Browse files
authored
Documentation updates (#187)
* Use consistent YAML syntax in example workflows * Add link to plugin env vars
1 parent 439ed0a commit d211a39

File tree

7 files changed

+38
-12
lines changed

7 files changed

+38
-12
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
1515
```yaml
1616
name: Build
1717

18-
on: [ push ]
18+
on:
19+
push:
1920

2021
jobs:
2122
build:
@@ -48,7 +49,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
4849
```yaml
4950
name: Dependency Submission
5051
51-
on: [ push ]
52+
on:
53+
push:
54+
branches: [ 'main' ]
5255
5356
permissions:
5457
contents: write
@@ -80,7 +83,10 @@ The action should be run in the root of the repository, as it will recursively s
8083

8184
```yaml
8285
name: "Validate Gradle Wrapper"
83-
on: [push, pull_request]
86+
87+
on:
88+
push:
89+
pull_request:
8490
8591
jobs:
8692
validation:

dependency-submission/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
1010
```yaml
1111
name: Dependency Submission
1212

13-
on: [ push ]
13+
on:
14+
push:
15+
branches: ['main']
1416

1517
permissions:
1618
contents: write

docs/dependency-submission.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
2525
```yaml
2626
name: Dependency Submission
2727

28-
on: [ push ]
28+
on:
29+
push:
30+
branches: [ 'main' ]
2931

3032
permissions:
3133
contents: write
@@ -104,6 +106,11 @@ In some cases, the default action configuration will not be sufficient, and addi
104106

105107
See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter.
106108

109+
The `GitHub Dependency Graph Gradle Plugin` can be further
110+
[configured via a number of environment variables](https://github.com/gradle/github-dependency-graph-gradle-plugin?#required-environment-variables).
111+
These will be automatically set by the `dependency-submission` action, but you may override these values
112+
by setting them explicitly in your workflow file.
113+
107114
# Resolving a dependency vulnerability
108115

109116
## Finding the source of a dependency vulnerability
@@ -292,7 +299,8 @@ Example of a pull request workflow that executes a build for a pull request and
292299
```yaml
293300
name: Dependency review for pull requests
294301
295-
on: [ pull_request ]
302+
on:
303+
pull_request:
296304
297305
permissions:
298306
contents: write
@@ -327,7 +335,8 @@ Because of this restriction, we require 2 separate workflows in order to generat
327335
```yaml
328336
name: Generate and save dependency graph
329337
330-
on: [ pull_request ]
338+
on:
339+
pull_request:
331340
332341
permissions:
333342
contents: read # 'write' permission is not available
@@ -381,7 +390,8 @@ Here's an example of a separate "Dependency Review" workflow that will wait for
381390
```yaml
382391
name: dependency-review
383392
384-
on: [ pull_request ]
393+
on:
394+
pull_request:
385395
386396
permissions:
387397
contents: read

docs/setup-gradle.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
2828
```yaml
2929
name: Run Gradle on every push
3030

31-
on: push
31+
on:
32+
push:
3233

3334
jobs:
3435
gradle:

docs/wrapper-validation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ Here's a sample complete workflow you can add to your repositories:
5656
**`.github/workflows/gradle-wrapper-validation.yml`**
5757
```yaml
5858
name: "Validate Gradle Wrapper"
59-
on: [push, pull_request]
59+
60+
on:
61+
push:
62+
pull_request:
6063
6164
jobs:
6265
validation:

setup-gradle/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
1111
```yaml
1212
name: Build
1313

14-
on: [ push ]
14+
on:
15+
push:
1516

1617
jobs:
1718
build:

wrapper-validation/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ The action should be run in the root of the repository, as it will recursively s
88

99
```yaml
1010
name: "Validate Gradle Wrapper"
11-
on: [push, pull_request]
11+
12+
on:
13+
push:
14+
pull_request:
1215

1316
jobs:
1417
validation:

0 commit comments

Comments
 (0)