Skip to content

Commit

Permalink
Simplify cache in action workflows (#254)
Browse files Browse the repository at this point in the history
* Simplify `build-on-pr` workflow

* Simplify `devbuild` workflow

* Simplify `publish-release` workflow
  • Loading branch information
altrisi authored Apr 4, 2022
1 parent 3b0cb32 commit 800ab60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 800ab60

Please sign in to comment.