Move top-level action to 'setup-gradle'

This commit is contained in:
daz 2024-01-25 11:49:04 -07:00
parent d23129d217
commit 2e7b28666d
No known key found for this signature in database
24 changed files with 67 additions and 67 deletions

View file

@ -22,7 +22,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure Gradle as default for unit test
uses: ./
uses: ./setup-gradle
with:
gradle-version: 8.5
- name: Run tests

View file

@ -11,7 +11,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Test build failure
uses: ./
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/kotlin-dsl
@ -23,7 +23,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Test wrapper missing
uses: ./
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/no-wrapper
@ -35,7 +35,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Test bad config value
uses: ./
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/no-wrapper

View file

@ -20,7 +20,7 @@ jobs:
npm run build
working-directory: sources
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
- name: Build kotlin-dsl project
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew assemble
@ -55,7 +55,7 @@ jobs:
npm run build
working-directory: sources
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
add-job-summary: on-failure
- name: Build kotlin-dsl project
@ -83,7 +83,7 @@ jobs:
mkdir ~/.gradle/caches
touch ~/.gradle/caches/dummy.txt
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
- name: Run build
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew assemble

View file

@ -13,7 +13,7 @@ jobs:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
add-job-summary-as-pr-comment: always
- name: Run build with Gradle wrapper
@ -27,7 +27,7 @@ jobs:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
add-job-summary-as-pr-comment: on-failure
- name: Run build with Gradle wrapper
@ -41,7 +41,7 @@ jobs:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
add-job-summary-as-pr-comment: on-failure
- name: Run build with Gradle wrapper

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Invoke with multi-line arguments
uses: ./
uses: ./setup-gradle
with:
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: |

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build with 3.1
@ -49,7 +49,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false
gradle-home-cache-cleanup: true
@ -69,7 +69,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Report Gradle User Home

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
# Add "enterprise" to main cache entry but omit "notifications"
@ -57,7 +57,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
# Use the same configuration as used in the seed build
gradle-home-cache-includes: |
@ -83,7 +83,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-disabled: true
- name: Run Gradle build
@ -108,7 +108,7 @@ jobs:
- name: Create dummy Gradle User Home
run: mkdir -p ~/.gradle/caches
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
- name: Run Gradle build
id: gradle
working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
@ -134,7 +134,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-write-only: true
- name: Build using Gradle wrapper
@ -155,7 +155,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build with --offline

View file

@ -26,7 +26,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
gradle-version: 7.0.1
dependency-graph: generate
@ -50,7 +50,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
gradle-version: 7.0.1
dependency-graph: generate
@ -73,7 +73,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: true
@ -93,7 +93,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: false

View file

@ -32,7 +32,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-upload
- name: Run gradle build
@ -50,7 +50,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-submit
- name: Run gradle build
@ -66,7 +66,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Submit dependency graphs
uses: ./
uses: ./setup-gradle
with:
dependency-graph: download-and-submit
@ -81,7 +81,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-submit
- id: gradle-assemble
@ -121,7 +121,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
uses: ./setup-gradle
with:
dependency-graph: generate-and-submit
- id: config-cache-store

View file

@ -31,7 +31,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
- name: List detected toolchains
shell: bash
working-directory: .github/workflow-samples/groovy-dsl
@ -70,7 +70,7 @@ jobs:
distribution: 'temurin'
java-version: '16'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
- name: List detected toolchains
shell: bash
working-directory: .github/workflow-samples/groovy-dsl

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Execute Gradle build
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
build-root-directory: .github/workflow-samples/groovy-dsl
@ -48,7 +48,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Execute Gradle build
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
build-root-directory: .github/workflow-samples/groovy-dsl

View file

@ -34,14 +34,14 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Test use defined Gradle version
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: 6.9
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help -DgradleVersionCheck=6.9
- name: Test use Gradle version alias
uses: ./
uses: ./setup-gradle
with:
gradle-version: release-candidate
build-root-directory: .github/workflow-samples/no-wrapper
@ -71,7 +71,7 @@ jobs:
distribution: temurin
java-version: 8
- name: Run Gradle build
uses: ./
uses: ./setup-gradle
id: gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches

View file

@ -45,7 +45,7 @@ jobs:
java-version: 8
- name: Setup Gradle
id: setup-gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: ${{ matrix.gradle }}
@ -77,7 +77,7 @@ jobs:
java-version: 8
- name: Setup Gradle
id: setup-gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: ${{ matrix.gradle }}

View file

@ -34,7 +34,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle with v6.9
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: 6.9
@ -42,14 +42,14 @@ jobs:
working-directory: .github/workflow-samples/no-wrapper
run: gradle help "-DgradleVersionCheck=6.9"
- name: Setup Gradle with v7.1.1
uses: ./
uses: ./setup-gradle
with:
gradle-version: 7.1.1
- name: Test uses Gradle v7.1.1
working-directory: .github/workflow-samples/no-wrapper
run: gradle help "-DgradleVersionCheck=7.1.1"
- name: Setup Gradle with release-candidate
uses: ./
uses: ./setup-gradle
with:
gradle-version: release-candidate
- name: Test use release-candidate
@ -57,7 +57,7 @@ jobs:
run: gradle help
- name: Setup Gradle with current
id: gradle-current
uses: ./
uses: ./setup-gradle
with:
gradle-version: current
- name: Check current version output parameter
@ -92,7 +92,7 @@ jobs:
java-version: 8
- name: Setup Gradle
id: setup-gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: ${{ matrix.gradle }}

View file

@ -39,7 +39,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@ -67,7 +67,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@ -105,7 +105,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle with no extracted cache entries restored
uses: ./
uses: ./setup-gradle
env:
GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl"
with:
@ -134,7 +134,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@ -162,7 +162,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@ -191,7 +191,7 @@ jobs:
distribution: 'liberica'
java-version: '21'
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

View file

@ -29,7 +29,7 @@ jobs:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build using Gradle wrapper
@ -52,7 +52,7 @@ jobs:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build with --offline

View file

@ -27,7 +27,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build using Gradle wrapper
@ -48,7 +48,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build with --offline
@ -69,7 +69,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build and verify tasks from cache

View file

@ -30,7 +30,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build using Gradle wrapper
@ -50,7 +50,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build with --offline
@ -70,7 +70,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build and verify tasks from cache
@ -90,7 +90,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle with no extracted cache entries restored
uses: ./
uses: ./setup-gradle
env:
GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl"
with:
@ -118,7 +118,7 @@ jobs:
touch ~/.gradle/gradle.properties
touch ~/.gradle/caches/dummy.txt
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
cache-overwrite-existing: true

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build using Gradle wrapper
@ -49,7 +49,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Execute Gradle build with --offline

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build gradle-plugin project
@ -48,7 +48,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Build gradle-plugin project

View file

@ -29,7 +29,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build kotlin-dsl project
@ -48,7 +48,7 @@ jobs:
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
uses: ./setup-gradle
with:
cache-read-only: true
- name: Build kotlin-dsl project

View file

@ -143,8 +143,8 @@ outputs:
runs:
using: 'node20'
main: 'dist/main/index.js'
post: 'dist/post/index.js'
main: '../dist/main/index.js'
post: '../dist/post/index.js'
branding:
icon: 'box'

View file