Skip to content

Commit a198436

Browse files
committed
Add Gradle caching to CI workflows
1 parent ce72203 commit a198436

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ jobs:
1313
java-version: 21
1414
- name: Setup Gradle
1515
uses: gradle/actions/setup-gradle@v5
16+
with:
17+
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
18+
- name: Cache Gradle Build Cache
19+
uses: actions/cache@v5
20+
with:
21+
path: |
22+
~/.gradle/caches
23+
~/.gradle/wrapper
24+
.gradle
25+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties') }}
26+
restore-keys: |
27+
${{ runner.os }}-gradle-
1628
- name: Cache Hytale Server
1729
uses: actions/cache@v5
1830
with:

.github/workflows/maven-publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ jobs:
1515
java-version: 21
1616
- name: Setup Gradle
1717
uses: gradle/actions/setup-gradle@v5
18+
with:
19+
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
20+
- name: Cache Gradle Build Cache
21+
uses: actions/cache@v5
22+
with:
23+
path: |
24+
~/.gradle/caches
25+
~/.gradle/wrapper
26+
.gradle
27+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
1830
- name: Cache Hytale Server
1931
uses: actions/cache@v5
2032
with:

0 commit comments

Comments
 (0)