From 800ab60c50442651e96ce1f4cb05790531035c83 Mon Sep 17 00:00:00 2001 From: altrisi Date: Mon, 4 Apr 2022 12:26:19 +0200 Subject: [PATCH] Simplify cache in action workflows (#254) * Simplify `build-on-pr` workflow * Simplify `devbuild` workflow * Simplify `publish-release` workflow --- .github/workflows/build-on-pr.yml | 7 +------ .github/workflows/devbuild.yml | 7 +------ .github/workflows/publish-release.yml | 14 ++------------ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml index c6d4ae67..b96c46b6 100644 --- a/.github/workflows/build-on-pr.yml +++ b/.github/workflows/build-on-pr.yml @@ -18,12 +18,7 @@ jobs: with: distribution: 'temurin' java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + cache: 'gradle' - name: Grant execute permission to gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index ec4294e5..7cecf2cf 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -17,12 +17,7 @@ jobs: with: distribution: 'temurin' java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + cache: 'gradle' - name: Grant execute permission to gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index df247f70..4d5188e7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -70,12 +70,7 @@ jobs: with: distribution: 'temurin' java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + cache: 'gradle' - name: Grant execute permission to gradlew run: chmod +x gradlew - name: Build with Gradle @@ -124,12 +119,7 @@ jobs: with: distribution: 'temurin' java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + cache: 'gradle' - name: Replace fabric.mod.json run: | cd src/main/resources