65 lines
3.5 KiB
YAML
65 lines
3.5 KiB
YAML
# This workflow uses actions that are not certified by GitHub.
|
|
# They are provided by a third-party and are governed by
|
|
# separate terms of service, privacy policy, and support
|
|
# documentation.
|
|
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
|
|
|
name: Java CI with Gradle
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
|
|
- name: Gradle Build Action
|
|
# You may pin to the exact commit or the version.
|
|
# uses: gradle/gradle-build-action@87a9a15658c426a54dd469d4fc7dc1a73ca9d4a6
|
|
uses: gradle/gradle-build-action@v2.10.0
|
|
with:
|
|
# Gradle version to use. If specified, this Gradle version will be downloaded, added to the PATH and used for invoking Gradle.
|
|
gradle-version: # optional
|
|
# Path to the Gradle executable. If specified, this executable will be added to the PATH and used for invoking Gradle.
|
|
gradle-executable: # optional
|
|
# Path to the root directory of the build. Default is the root of the GitHub workspace.
|
|
build-root-directory: # optional
|
|
# When 'true', all caching is disabled. No entries will be written to or read from the cache.
|
|
cache-disabled: false # optional
|
|
# When 'true', existing entries will be read from the cache but no entries will be written.
|
|
|
|
cache-read-only: false # optional, default is ${{ github.event.repository != null && github.ref_name != github.event.repository.default_branch }}
|
|
# When 'true', entries will not be restored from the cache but will be saved at the end of the Job.
|
|
|
|
cache-write-only: # optional
|
|
# When 'true', a pre-existing Gradle User Home will not prevent the cache from being restored.
|
|
cache-overwrite-existing: # optional
|
|
# Paths within Gradle User Home to cache.
|
|
gradle-home-cache-includes: # optional, default is caches
|
|
|
|
# Paths within Gradle User Home to exclude from cache.
|
|
gradle-home-cache-excludes: # optional
|
|
# When 'true', the action will attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
|
|
gradle-home-cache-cleanup: # optional
|
|
# Gradle command line arguments (supports multi-line input)
|
|
arguments: # optional
|
|
# When 'false', no Job Summary will be generated for the Job.
|
|
generate-job-summary: # optional, default is true
|
|
# Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how. Valid values are 'disabled' (default), 'generate', 'generate-and-submit' and 'download-and-submit'.
|
|
dependency-graph: # optional, default is disabled
|
|
# Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
|
|
artifact-retention-days: # optional
|
|
# When 'true', the action will not attempt to restore the Gradle User Home entries from other Jobs.
|
|
gradle-home-cache-strict-match: # optional
|
|
# Used to uniquely identify the current job invocation. Defaults to the matrix values for this job; this should not be overridden by users (INTERNAL).
|
|
workflow-job-context: # optional, default is ${{ toJSON(matrix) }}
|
|
# The GitHub token used to authenticate when submitting via the Dependency Submission API.
|
|
github-token: # optional, default is ${{ github.token }}
|
|
|