-
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
Changes from all commits
7e367f8
60eaa68
70ac0fd
09283bc
d732860
8fe2003
af825c5
b4df1bc
d26c108
74b99db
2aebc12
0362784
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ runs: | |
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | ||
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
@@ -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' | ||
shell: bash | ||
run: | | ||
rm -fr ~/.m2/repository/org/activiti | ||
rm -fr ~/.m2/repository/com/alfresco | ||
|
||
- 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v5.1.0 | ||
v5.2.0 |
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