Skip to content

Commit

Permalink
feat(build,ci): workflow pre-seeding Maven cache from develop #10428
Browse files Browse the repository at this point in the history
Contains the feature branch for now, too. Will be deleted later before merging it to develop.
  • Loading branch information
poikilotherm committed Apr 12, 2024
1 parent 25cbdd7 commit 2de674f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/maven_cache_seed.yaml
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 }}

0 comments on commit 2de674f

Please sign in to comment.