-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build,ci): workflow pre-seeding Maven cache from develop #10428
Contains the feature branch for now, too. Will be deleted later before merging it to develop.
- Loading branch information
1 parent
25cbdd7
commit 2de674f
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Maven Cache Seeding | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- 10478-version-base-img | ||
|
||
env: | ||
COMMON_CACHE_NAME: dataverse-maven-cache | ||
|
||
jobs: | ||
preseed: | ||
name: Drop and Re-Seed Local Repository | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- name: Drop common cache | ||
uses: prantlf/delete-cache-action@v2 | ||
with: | ||
key: ${{ env.COMMON_CACHE_NAME }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "17" | ||
distribution: temurin | ||
- name: Re-Seed common cache | ||
run: | | ||
mvn -B -f modules/dataverse-parent dependency:go-offline dependency:resolve-plugins | ||
- name: Save the cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ env.COMMON_CACHE_NAME }} | ||
|