Update update-gradle-wrapper.yml #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Gradle | |
on: | |
push: | |
pull_request: | |
branches: [ "release" ] | |
jobs: | |
build: | |
if: "!contains(github.event.commits[0].message, '[ci-skip]')" | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
java: [ '17' ] | |
steps: | |
- if: ${{ github.event_name == 'push' }} | |
uses: actions/checkout@v4 | |
- if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
cache: 'gradle' | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v2 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build with Gradle | |
run: ./gradlew build --no-daemon --stacktrace | |
- name: Rebuild on Failure | |
if: ${{ failure() }} | |
run: | | |
./gradlew clean cleanCache | |
./gradlew build --no-daemon --stacktrace |