From ccaeba33b5c1aceb5309241b2e228fd6f52c8378 Mon Sep 17 00:00:00 2001 From: psuzn Date: Fri, 7 Jun 2024 14:34:00 +0545 Subject: [PATCH] add cache for ci --- .github/workflows/cd.yaml | 15 ++++++++++++++- .github/workflows/ci.yaml | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a469125..980cff3 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -14,11 +14,24 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Cache + uses: actions/cache@v4 + with: + path: | + ./build + ./.gradle + ~/.gradle/caches + ~/.gradle/wrapper + ~/.m2/repository + key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 - name: Build Project with Gradle - uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 + uses: gradle/gradle-build-action@v3 with: arguments: build diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 521b646..bf90b74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,24 @@ jobs: distribution: 'temurin' cache: gradle + - name: Cache + uses: actions/cache@v4 + with: + path: | + ./build + ./.gradle + ~/.gradle/caches + ~/.gradle/wrapper + ~/.m2/repository + key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v3 - name: Build Project with Gradle - uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 + uses: gradle/gradle-build-action@v3 with: arguments: build