From 2a8bfcf2313611da65fd8cb2d81f50d99cb74ca0 Mon Sep 17 00:00:00 2001 From: daz Date: Thu, 25 Jan 2024 13:04:40 -0700 Subject: [PATCH] Delegate action implementation to gradle/actions/setup-gradle From v3 onwards, the `gradle-build-action` will be soft deprecated in preference of `gradle/actions/setup-gradle`, which is a drop-in replacement. Version numbers for these 2 actions will remain in sync. Workflows that use `gradle/gradle-build-action` will transparently delegate to `gradle/actions/setup-gradle`. At a later date, a deprecation warning will be added to `gradle/gradle-build-action`, encouraging users to migrate. All of the repository sources have been migrated to the `gradle/actions` repository, and `gradle/actions/setup-gradle` has been released with `v3.0.0-beta.6`. Going forward, releases will be first performed for `gradle/actions/setup-gradle`, with a parallel release of `gradle/gradle-build-action` soon afterward. Releasing as `gradle/gradle-build-action@v3` will allow dependabot to encourage users to upgrade from `v2`. The deprecation warning (to be added later) will encourage users to migrate to `gradle/actions/setup-gradle`. --- action.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index da2e0f0..febf3e1 100644 --- a/action.yml +++ b/action.yml @@ -136,15 +136,44 @@ inputs: outputs: build-scan-url: description: Link to the Build ScanĀ® generated by a Gradle build. Note that this output applies to a Step executing Gradle, not to the `gradle-build-action` Step itself. + value: ${{ steps.setup-gradle.outputs.build-scan-url }} dependency-graph-file: description: Path to the GitHub Dependency Graph snapshot file generated by a Gradle build. Note that this output applies to a Step executing Gradle, not to the `gradle-build-action` Step itself. + value: ${{ steps.setup-gradle.outputs.dependency-graph-file }} gradle-version: description: Version of Gradle that was setup by the action + value: ${{ steps.setup-gradle.outputs.gradle-version }} runs: - using: 'node20' - main: 'dist/main/index.js' - post: 'dist/post/index.js' + using: "composite" + steps: + - name: Setup Gradle + id: setup-gradle + uses: gradle/actions/setup-gradle@v3.0.0-beta.6 + with: + gradle-version: ${{ inputs.gradle-version }} + cache-disabled: ${{ inputs.cache-disabled }} + cache-read-only: ${{ inputs.cache-read-only }} + cache-write-only: ${{ inputs.cache-write-only }} + cache-overwrite-existing: ${{ inputs.cache-overwrite-existing }} + cache-encryption-key: ${{ inputs.cache-encryption-key }} + gradle-home-cache-includes: ${{ inputs.gradle-home-cache-includes }} + gradle-home-cache-excludes: ${{ inputs.gradle-home-cache-excludes }} + gradle-home-cache-cleanup: ${{ inputs.gradle-home-cache-cleanup }} + add-job-summary: ${{ inputs.add-job-summary }} + add-job-summary-as-pr-comment: ${{ inputs.add-job-summary-as-pr-comment }} + dependency-graph: ${{ inputs.dependency-graph }} + dependency-graph-continue-on-failure: ${{ inputs.dependency-graph-continue-on-failure }} + artifact-retention-days: ${{ inputs.artifact-retention-days }} + build-scan-publish: ${{ inputs.build-scan-publish }} + build-scan-terms-of-service-url: ${{ inputs.build-scan-terms-of-service-url }} + build-scan-terms-of-service-agree: ${{ inputs.build-scan-terms-of-service-agree }} + arguments: ${{ inputs.arguments }} + build-root-directory: ${{ inputs.build-root-directory }} + generate-job-summary: ${{ inputs.generate-job-summary }} + gradle-home-cache-strict-match: ${{ inputs.gradle-home-cache-strict-match }} + workflow-job-context: ${{ inputs.workflow-job-context }} + github-token: ${{ inputs.github-token }} branding: icon: 'box'