mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
d0a116fff5
Adding Develocity input actions. If an input is configured in the action, it will generate the environment variable, example: ```yaml - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: develocity-injection-enabled: true develocity-url: https://develocity.your-server.com develocity-plugin-version: 3.17.4 - name: Run a Gradle build with Develocity injection enabled from input actions run: ./gradlew build ``` This configuration will create the environment variables: ``` DEVELOCITY_INJECTION_ENABLED=true DEVELOCITY_URL=https://develocity.your-server.com DEVELOCITY_PLUGIN_VERSION=3.17.4 ``` Relation variable-input available: | Variable | Input | |--------------------------------------|--------------------------------------| | DEVELOCITY_INJECTION_ENABLED | develocity-injection-enabled | | DEVELOCITY_URL | develocity-url | | DEVELOCITY_ALLOW_UNTRUSTED_SERVER | develocity-allow-untrusted-server | | DEVELOCITY_CAPTURE_FILE_FINGERPRINTS | develocity-capture-file-fingerprints | | DEVELOCITY_ENFORCE_URL | develocity-enforce-url | | DEVELOCITY_PLUGIN_VERSION | develocity-plugin-version | | DEVELOCITY_CCUD_PLUGIN_VERSION | develocity-ccud-plugin-version | | GRADLE_PLUGIN_REPOSITORY_URL | gradle-plugin-repository-url | | GRADLE_PLUGIN_REPOSITORY_USERNAME | gradle-plugin-repository-username | | GRADLE_PLUGIN_REPOSITORY_PASSWORD | gradle-plugin-repository-password | |
||
---|---|---|
.. | ||
action.yml | ||
README.md |
The setup-gradle
action
The setup-gradle
action can be used to configure Gradle for optimal execution on any platform supported by GitHub Actions.
This replaces the previous gradle/gradle-build-action
, which now delegates to this implementation.
The recommended way to execute any Gradle build is with the help of the Gradle Wrapper, and the examples assume that the Gradle Wrapper has been configured for the project. See this example if your project doesn't use the Gradle Wrapper.
Example usage
name: Build
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew build
See the full action documentation for more advanced usage scenarios.