Skip to content

Commit 5051b36

Browse files
committed
Fix GitHub Actions caching to use the correct property and value
1 parent 9dd4094 commit 5051b36

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/maven_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
distribution: 'temurin'
2323
- name: Cache and restore Maven packages on master
2424
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
25-
if: ${{ github.ref_name == 'master' }}
25+
if: ${{ github.ref == 'refs/heads/master' }}
2626
with:
2727
path: ~/.m2
2828
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2929
restore-keys: ${{ runner.os }}-m2
3030
- name: Restore Maven packages on PR
3131
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
32-
if: ${{ github.ref_name != 'master' }}
32+
if: ${{ github.ref != 'refs/heads/master' }}
3333
with:
3434
path: ~/.m2
3535
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

.github/workflows/maven_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
distribution: 'temurin'
2525
- name: Cache and restore Maven packages on master
2626
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
27-
if: ${{ github.ref_name == 'master' }}
27+
if: ${{ github.ref == 'refs/heads/master' }}
2828
with:
2929
path: ~/.m2
3030
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3131
restore-keys: ${{ runner.os }}-m2
3232
- name: Restore Maven packages on PR
3333
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
34-
if: ${{ github.ref_name != 'master' }}
34+
if: ${{ github.ref != 'refs/heads/master' }}
3535
with:
3636
path: ~/.m2
3737
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

0 commit comments

Comments
 (0)