Android-Password-Store/.github/reusable-workflows/setup-gradle/action.yml
2024-09-18 23:17:38 +05:30

54 lines
1.8 KiB
YAML

name: 'Setup Gradle'
description: 'Checks out the repository and sets up Java and Gradle'
inputs:
token:
description: 'token input for actions/checkout'
required: false
default: ${{ github.token }}
fetch-depth:
description: 'fetch-depth input for actions/checkout'
required: false
default: 1
ref:
description: 'ref input for actions/checkout'
required: false
java-version:
description: 'java-version input for actions/setup-java'
required: false
default: 20
gradle-version:
description: 'gradle-version input for actions/setup-java'
required: false
cache-read-only:
description: 'cache-read-only input for gradle/actions/setup-gradle'
required: false
default: ${{ github.event.repository != null && github.ref_name != github.event.repository.default_branch }}
dependency-graph:
description: 'dependency-graph input for gradle/actions/setup-gradle'
required: false
default: 'disabled'
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: ${{ inputs.fetch-depth }}
ref: ${{ inputs.ref }}
token: ${{ inputs.token }}
- name: Set up JDK
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
distribution: temurin
java-version: ${{ inputs.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4
with:
add-job-summary: always
cache-cleanup: on-success
cache-read-only: ${{ inputs.cache-read-only }}
dependency-graph: ${{ inputs.dependency-graph }}
gradle-version: ${{ inputs.gradle-version }}
validate-wrappers: true