Skip to content

Commit 57f2e39

Browse files
committed
Enable Gradle cache saving for release branches
1 parent 1fcfb19 commit 57f2e39

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ jobs:
2323
with:
2424
distribution: 'temurin'
2525
java-version: 17
26+
- uses: actions-ecosystem/action-regex-match@v2
27+
id: branch-match
28+
with:
29+
text: ${{ github.ref }}
30+
regex: '^refs/heads/\d{4}\.\d$'
2631
- name: Setup Gradle
2732
uses: gradle/actions/setup-gradle@v4
33+
with:
34+
cache-read-only: ${{ github.ref != 'refs/heads/dev' && steps.branch-match.outputs.match != '' }}
2835
- name: Build
2936
run: ./gradlew build --stacktrace

0 commit comments

Comments
 (0)