Update docs for v4 release

This commit is contained in:
daz 2024-08-03 16:39:51 -06:00
parent af1da67850
commit 895252588e
No known key found for this signature in database
9 changed files with 40 additions and 40 deletions

View file

@ -26,7 +26,7 @@ jobs:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 # Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
- name: Run integration tests
working-directory: sources/test/init-scripts
run: ./gradlew check

View file

@ -30,7 +30,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build
```
@ -68,7 +68,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.

View file

@ -29,7 +29,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.

View file

@ -43,7 +43,7 @@ jobs:
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
### Gradle execution
@ -68,7 +68,7 @@ Three input parameters are required, one to enable publishing and two more to ac
```yaml
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
@ -83,7 +83,7 @@ In some cases, the default action configuration will not be sufficient, and addi
```yaml
- name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
# Use a particular Gradle version instead of the configured wrapper.
gradle-version: 8.6
@ -273,7 +273,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
```yaml
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
# Exclude all dependencies that originate solely in the 'buildSrc' project
dependency-graph-exclude-projets: ':buildSrc'
@ -317,10 +317,10 @@ jobs:
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
- name: Perform dependency review
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
```
## Usage with pull requests from public forked repositories
@ -353,7 +353,7 @@ jobs:
java-version: 17
- name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: generate-and-upload
```
@ -376,7 +376,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: download-and-submit # Download saved dependency-graph and submit
```
@ -403,7 +403,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
with:
retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600

View file

@ -20,7 +20,7 @@ To convert your workflows, simply replace:
```
with
```
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
```
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
@ -40,7 +40,7 @@ To convert your workflows, simply replace:
```
with
```
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
```
## Using the action to execute Gradle via the `arguments` parameter is deprecated
@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
```
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Assemble the project
run: ./gradlew assemble
@ -99,7 +99,7 @@ The exact syntax depends on whether or not your project is configured with the [
```
- name: Setup Gradle for a non-wrapper project
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.9

View file

@ -45,7 +45,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build
run: ./gradlew build
@ -58,7 +58,7 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi
```yaml
- name: Setup Gradle 8.5
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.5
- name: Build with Gradle 8.5
@ -96,7 +96,7 @@ jobs:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
id: setup-gradle
with:
gradle-version: release-candidate
@ -213,7 +213,7 @@ jobs:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.6
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
@ -455,7 +455,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
@ -492,13 +492,13 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Run build with Gradle wrapper
run: ./gradlew build --scan
- name: Upload build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: build-reports
@ -523,7 +523,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: false
```
@ -535,7 +535,7 @@ These are not allowed by default.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: true
allow-snapshot-wrappers: true
@ -600,7 +600,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
@ -627,7 +627,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
```yaml
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: false
@ -652,7 +652,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
@ -682,7 +682,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Build the app, generating a graph of dependencies required
@ -718,7 +718,7 @@ To reduce storage costs for these artifacts, you can set the `artifact-retention
```yaml
- name: Generate dependency graph, but only retain artifact for one day
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate
artifact-retention-days: 1
@ -739,7 +739,7 @@ Here's a minimal example:
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
develocity-injection-enabled: true
develocity-url: https://develocity.your-server.com
@ -756,7 +756,7 @@ In the likely scenario that your Develocity server requires authentication, you
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
@ -814,7 +814,7 @@ Here's an example using the env vars:
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Run a Gradle build with Develocity injection enabled with environment variables
run: ./gradlew build
@ -833,7 +833,7 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"

View file

@ -47,7 +47,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
```yaml
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
```
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
@ -70,7 +70,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
## Contributing to an external GitHub Repository

View file

@ -26,7 +26,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build
```

View file

@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios.