Use consistent YAML syntax in example workflows

This commit is contained in:
daz 2024-04-18 09:34:15 -06:00
parent 439ed0a0ac
commit 94a526b583
No known key found for this signature in database
7 changed files with 33 additions and 12 deletions

View File

@ -15,7 +15,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
```yaml
name: Build
on: [ push ]
on:
push:
jobs:
build:
@ -48,7 +49,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
```yaml
name: Dependency Submission
on: [ push ]
on:
push:
branches: [ 'main' ]
permissions:
contents: write
@ -80,7 +83,10 @@ The action should be run in the root of the repository, as it will recursively s
```yaml
name: "Validate Gradle Wrapper"
on: [push, pull_request]
on:
push:
pull_request:
jobs:
validation:

View File

@ -10,7 +10,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
```yaml
name: Dependency Submission
on: [ push ]
on:
push:
branches: ['main']
permissions:
contents: write

View File

@ -25,7 +25,9 @@ Simply add this as a new workflow file to your repository (eg `.github/workflows
```yaml
name: Dependency Submission
on: [ push ]
on:
push:
branches: [ 'main' ]
permissions:
contents: write
@ -292,7 +294,8 @@ Example of a pull request workflow that executes a build for a pull request and
```yaml
name: Dependency review for pull requests
on: [ pull_request ]
on:
pull_request:
permissions:
contents: write
@ -327,7 +330,8 @@ Because of this restriction, we require 2 separate workflows in order to generat
```yaml
name: Generate and save dependency graph
on: [ pull_request ]
on:
pull_request:
permissions:
contents: read # 'write' permission is not available
@ -381,7 +385,8 @@ Here's an example of a separate "Dependency Review" workflow that will wait for
```yaml
name: dependency-review
on: [ pull_request ]
on:
pull_request:
permissions:
contents: read

View File

@ -28,7 +28,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
```yaml
name: Run Gradle on every push
on: push
on:
push:
jobs:
gradle:

View File

@ -56,7 +56,10 @@ Here's a sample complete workflow you can add to your repositories:
**`.github/workflows/gradle-wrapper-validation.yml`**
```yaml
name: "Validate Gradle Wrapper"
on: [push, pull_request]
on:
push:
pull_request:
jobs:
validation:

View File

@ -11,7 +11,8 @@ The recommended way to execute any Gradle build is with the help of the [Gradle
```yaml
name: Build
on: [ push ]
on:
push:
jobs:
build:

View File

@ -8,7 +8,10 @@ The action should be run in the root of the repository, as it will recursively s
```yaml
name: "Validate Gradle Wrapper"
on: [push, pull_request]
on:
push:
pull_request:
jobs:
validation: