]> source.dussan.org Git - poi.git/commitdiff
Cache Gradle wrapper & caches during GitHub Actions
authorMarius Volkhart <mariusvolkhart@apache.org>
Sun, 7 Feb 2021 00:30:41 +0000 (00:30 +0000)
committerMarius Volkhart <mariusvolkhart@apache.org>
Sun, 7 Feb 2021 00:30:41 +0000 (00:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886266 13f79535-47bb-0310-9956-ffa450edef68

.github/workflows/test-gradle.yml

index 7594f29159a941044aa00479d60175c796c4b934..ee1522472ec3f31328d19e8765053bbb6d3ac450 100644 (file)
@@ -22,13 +22,15 @@ jobs:
       with:
         java-version: 1.8
 
-    - name: Cache
+    - name: Cache Gradle wrapper and dependencies
       uses: actions/cache@v2.1.3
       with:
-        # A list of files, directories, and wildcard patterns to cache and restore
-        path: lib
-        # An explicit key for restoring and saving the cache
-        key: poi-third-party-libs
+        path: |
+          ~/.gradle/caches
+          ~/.gradle/wrapper
+        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
+        restore-keys: |
+          ${{ runner.os }}-gradle-
 
     - name: Grant execute permission for gradlew
       run: chmod +x gradlew