Skip to content

Commit

Permalink
style(ct): add common cache download to base image
Browse files Browse the repository at this point in the history
Without accurate measuring it seems like we use ~1 minute to download Maven artifacts for this workflow. Lets try to cut that down some by reusing the common cache.
  • Loading branch information
poikilotherm committed Apr 12, 2024
1 parent 818bfd4 commit ef5ffa5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,19 @@ jobs:
echo "JAVA_VERSION=$(grep '<target.java.version>' modules/dataverse-parent/pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV}
- name: Set up JDK ${{ env.JAVA_VERSION }}
id: setup-java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: 'maven'
cache-dependency-path: |
modules/container-base/pom.xml
- name: Download common cache on branch cache miss
if: ${{ steps.setup-java.outputs.cache-hit != 'true' }}
uses: actions/cache/restore@v4
with:
key: dataverse-maven-cache

# Note: Accessing, pushing tags etc. to DockerHub will only succeed in upstream and
# on events in context of upstream because secrets. PRs run in context of forks by default!
Expand Down

0 comments on commit ef5ffa5

Please sign in to comment.