From a0f6affb6888bf2e65eef5bcb5cebacef4860f71 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 21 Nov 2020 01:37:28 +0100 Subject: [PATCH] GitHub Actions: cache gradle wrapper; fixed key for caching gradle cache --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd7a74a8..bbbb5b4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,24 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - - name: Cache Gradle packages + + - name: Cache Gradle wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + + - name: Cache Gradle cache uses: actions/cache@v2 with: path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} restore-keys: ${{ runner.os }}-gradle + - name: Build with Gradle run: ./gradlew build