From a943db6ac892fcd0c83e3857ffdba7574179d6da Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Mon, 29 Jan 2024 16:52:43 +0100 Subject: [PATCH] chore(ci): use setup-gradle to handle cache (#2628) --- .github/actions/setup/action.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 27f41aa6fc..ea18b3deeb 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -25,12 +25,17 @@ runs: with: distribution: zulu java-version-file: config/.java-version - cache: gradle - name: Validate gradle wrapper if: inputs.type != 'minimal' uses: gradle/wrapper-validation-action@v1 + - name: Setup gradle + if: inputs.type != 'minimal' + uses: gradle/actions/setup-gradle@v3 + with: + cache-read-only: false + - name: Download Java formatter if: inputs.type != 'minimal' shell: bash @@ -55,12 +60,6 @@ runs: # let yarn handle the cache hash key: yarn-cache-${{ env.CACHE_VERSION }} - - name: Cache node modules - uses: actions/cache@v4 - with: - path: node_modules - key: node-modules-${{ env.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }} - - name: Install JavaScript dependencies shell: bash run: YARN_ENABLE_HARDENED_MODE=0 yarn install @@ -152,10 +151,8 @@ runs: if: ${{ inputs.language == 'kotlin' }} uses: actions/cache@v4 with: - path: | - clients/algoliasearch-client-kotlin/.gradle - clients/algoliasearch-client-kotlin/client/build/spotless - key: gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('clients/algoliasearch-client-kotlin/build.gradle.kts') }} + path: clients/algoliasearch-client-kotlin/client/build/spotless + key: spotless-${{ env.CACHE_VERSION }}-${{ hashFiles('clients/algoliasearch-client-kotlin/build.gradle.kts') }} # Dart - name: Install dart