mirror of
https://github.com/gradle/actions.git
synced 2025-08-18 14:51:28 +08:00
Documentation updates (#187)
* Use consistent YAML syntax in example workflows * Add link to plugin env vars
This commit is contained in:
parent
439ed0a0ac
commit
d211a39090
12
README.md
12
README.md
@ -15,7 +15,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
|
|||||||
```yaml
|
```yaml
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -48,7 +49,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
|
|||||||
```yaml
|
```yaml
|
||||||
name: Dependency Submission
|
name: Dependency Submission
|
||||||
|
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -80,7 +83,10 @@ The action should be run in the root of the repository, as it will recursively s
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: "Validate Gradle Wrapper"
|
name: "Validate Gradle Wrapper"
|
||||||
on: [push, pull_request]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validation:
|
validation:
|
||||||
|
@ -10,7 +10,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
|
|||||||
```yaml
|
```yaml
|
||||||
name: Dependency Submission
|
name: Dependency Submission
|
||||||
|
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
@ -25,7 +25,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
|
|||||||
```yaml
|
```yaml
|
||||||
name: Dependency Submission
|
name: Dependency Submission
|
||||||
|
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -104,6 +106,11 @@ In some cases, the default action configuration will not be sufficient, and addi
|
|||||||
|
|
||||||
See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter.
|
See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter.
|
||||||
|
|
||||||
|
The `GitHub Dependency Graph Gradle Plugin` can be further
|
||||||
|
[configured via a number of environment variables](https://github.com/gradle/github-dependency-graph-gradle-plugin?#required-environment-variables).
|
||||||
|
These will be automatically set by the `dependency-submission` action, but you may override these values
|
||||||
|
by setting them explicitly in your workflow file.
|
||||||
|
|
||||||
# Resolving a dependency vulnerability
|
# Resolving a dependency vulnerability
|
||||||
|
|
||||||
## Finding the source of a dependency vulnerability
|
## 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
|
|||||||
```yaml
|
```yaml
|
||||||
name: Dependency review for pull requests
|
name: Dependency review for pull requests
|
||||||
|
|
||||||
on: [ pull_request ]
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -327,7 +335,8 @@ Because of this restriction, we require 2 separate workflows in order to generat
|
|||||||
```yaml
|
```yaml
|
||||||
name: Generate and save dependency graph
|
name: Generate and save dependency graph
|
||||||
|
|
||||||
on: [ pull_request ]
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # 'write' permission is not available
|
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
|
|||||||
```yaml
|
```yaml
|
||||||
name: dependency-review
|
name: dependency-review
|
||||||
|
|
||||||
on: [ pull_request ]
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -28,7 +28,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
|
|||||||
```yaml
|
```yaml
|
||||||
name: Run Gradle on every push
|
name: Run Gradle on every push
|
||||||
|
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
gradle:
|
gradle:
|
||||||
|
@ -56,7 +56,10 @@ Here's a sample complete workflow you can add to your repositories:
|
|||||||
**`.github/workflows/gradle-wrapper-validation.yml`**
|
**`.github/workflows/gradle-wrapper-validation.yml`**
|
||||||
```yaml
|
```yaml
|
||||||
name: "Validate Gradle Wrapper"
|
name: "Validate Gradle Wrapper"
|
||||||
on: [push, pull_request]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validation:
|
validation:
|
||||||
|
@ -11,7 +11,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
|
|||||||
```yaml
|
```yaml
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -8,7 +8,10 @@ The action should be run in the root of the repository, as it will recursively s
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: "Validate Gradle Wrapper"
|
name: "Validate Gradle Wrapper"
|
||||||
on: [push, pull_request]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validation:
|
validation:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user