From 0f85e24fdf89227ac39c2e43da1e2cb9b035458a Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 25 Sep 2024 10:52:46 +0200 Subject: [PATCH] ci: update Gradle caching in workflow configuration --- .gitea/workflows/qs.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/qs.yml b/.gitea/workflows/qs.yml index 30d3d8a..d1f7746 100644 --- a/.gitea/workflows/qs.yml +++ b/.gitea/workflows/qs.yml @@ -15,18 +15,13 @@ jobs: - uses: actions/cache@v3 with: path: | - $HOME/.m2/repository - ~/.m2/repository - ./.gradle - ./app/build - ./build - ./release - key: gradle-${{ runner.os }} + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | - gradle-${{ runner.os }} - gradle- - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + ${{ runner.os }}-gradle- + - name: "Prepare Gradle" + run: gradle clean - name: "Check" run: gradle testClasses - name: "Stop Gradle" @@ -42,18 +37,13 @@ jobs: - uses: actions/cache@v3 with: path: | - $HOME/.m2/repository - ~/.m2/repository - ./.gradle - ./app/build - ./build - ./release - key: gradle-${{ runner.os }} + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | - gradle-${{ runner.os }} - gradle- - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + ${{ runner.os }}-gradle- + - name: "Prepare Gradle" + run: gradle clean - name: "Check" run: gradle check - name: "Stop Gradle"