Cache Maven dependencies in GitHub Actions
authorChristian Femers <femers@in.tum.de>
Fri, 11 Sep 2020 13:34:27 +0000 (15:34 +0200)
committerChristian Femers <femers@in.tum.de>
Fri, 11 Sep 2020 13:34:27 +0000 (15:34 +0200)
.github/workflows/maven.yml

index d9ea203..605bdf8 100644 (file)
@@ -19,5 +19,12 @@ jobs:
       uses: actions/setup-java@v1
       with:
         java-version: 11
+    - name: Cache Maven Dependencies
+      uses: actions/cache@v2.1.1
+      with:
+        path: ~/.m2/repository
+        key: mograsim-maven-${{ hashFiles('**/pom.xml,**/MANIFEST.MF') }}
+        restore-keys: |
+          mograsim-maven-
     - name: Build with Maven
       run: mvn --batch-mode --errors --fail-at-end --show-version clean verify --file pom.xml