Skip to content

Commit 57d2db7

Browse files
authored
Save maven cache only on pushes into default branch (#33)
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
1 parent a9fe7ee commit 57d2db7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/actions/build/build-binaries/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ runs:
105105
make java_install
106106
107107
- name: Save Maven cache
108-
if: ${{ inputs.mainJavaBuild == 'true' }}
108+
# Save maven cache only after pushes into default branch
109+
if: ${{ inputs.mainJavaBuild == 'true' && github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
109110
uses: actions/cache/save@v5
110111
with:
111112
path: ~/.m2/repository

0 commit comments

Comments
 (0)