-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AAE-17877 skip saving maven cache on PRs #380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to better describe what you are trying to achieve here because I am completely missing the point
47ba8bb
to
7e367f8
Compare
Co-authored-by: Anahide Tchertchian <[email protected]>
|
||
- name: Save maven cache | ||
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | ||
if: github.event_name == 'push' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't prevent saving cache for branches different than the default one if the caller workflow is configured to build also those
something like && github.event.repository.default_branch == github.ref_name
should fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we want to keep the cache on maintenance branches, that's why keeping the logic checking event push
makes more sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we need to consider maintenance branches as well, and we usually don't configure the CI to build on feature branches, so it should not be a problem.
@@ -229,3 +229,17 @@ runs: | |||
run: | | |||
git tag -a $VERSION -m "Release version $VERSION" | |||
git push origin $VERSION | |||
|
|||
- name: Clean m2 cache | |||
if: github.event_name == 'push' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also if the condition is changed this should be kept consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Checklist
Description
We currently use cache action that will save changes on the m2 maven cache.
This could be improved by just restoring core dependencies from that cache on each build.
Once PR is merged that cache can be updated