From f4e053dda188162bdfc775ba6c1076638399ff62 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Sun, 16 Jan 2022 16:18:09 -0700 Subject: [PATCH] Upgrade to reference `actions/setup-java@v2` - Update all references in README.md - Update version used in `pr-build-scan-comment` - Discourage the use of `cache: gradle` with `setup-java@v2` --- .github/workflows/pr-build-scan-comment.yml | 2 +- README.md | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-build-scan-comment.yml b/.github/workflows/pr-build-scan-comment.yml index f40bddc..3f2333a 100644 --- a/.github/workflows/pr-build-scan-comment.yml +++ b/.github/workflows/pr-build-scan-comment.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: java-version: 11 - uses: ./ diff --git a/README.md b/README.md index 8b7c16b..eca0329 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: java-version: 11 @@ -33,7 +33,7 @@ jobs: ## Why use the `gradle-build-action`? -It is possible to directly invoke Gradle in your workflow, and the `setup-java` action provides a simple way to cache Gradle dependencies. +It is possible to directly invoke Gradle in your workflow, and the `actions/setup-java@v2` action provides a simple way to cache Gradle dependencies. However, the `gradle-build-action` offers a number of advantages over this approach: @@ -45,6 +45,8 @@ However, the `gradle-build-action` offers a number of advantages over this appro The `gradle-build-action` is designed to provide these benefits with minimal configuration. These features work both when Gradle is executed via the `gradle-build-action` and for any Gradle execution in subsequent steps. +When using `gradle-build-action` we recommend that you _not_ use `actions/cache` or `actions/setup-java@v2` to explicitly cache the Gradle User Home. Doing so may interfere with the caching provided by this action. + ## Use a specific Gradle version The `gradle-build-action` can download and install a specified Gradle version, adding this installed version to the PATH. @@ -80,7 +82,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: java-version: 11 - uses: gradle/gradle-build-action@v2 @@ -106,7 +108,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: java-version: 11 @@ -302,7 +304,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: java-version: 11 - uses: gradle/gradle-build-action@v2