diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index c1fe23b114..4055fcc289 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -48,7 +48,7 @@ jobs: java_compiler=${{ matrix.java-compiler }} verify_build=${{ matrix.verify-build }} cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: ${{ github.event_name == 'push' && 'type=gha,mode=max' || '' }} centos7-build: name: Centos7 legacy build on Java 11 with compiler target 11 @@ -73,7 +73,7 @@ jobs: target_os=centos7 verify_build=false cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: ${{ github.event_name == 'push' && 'type=gha,mode=max' || '' }} macos-build: name: MacOS non-standard build on Java 11 with compiler target 11 diff --git a/contrib/docker/Dockerfile.ci b/contrib/docker/Dockerfile.ci index 2114dbb7d0..bd68c9af1c 100644 --- a/contrib/docker/Dockerfile.ci +++ b/contrib/docker/Dockerfile.ci @@ -96,8 +96,10 @@ RUN git init --quiet \ && git commit --quiet -am. ARG java_compiler=11 +ARG maven_phases='clean verify' +ARG maven_profiles='-Pdist' RUN --mount=type=cache,uid=${uid},gid=${gid},target=/home/${user}/.m2 \ - mvn -V -B -e -ntp "-Dstyle.color=always" -Dmaven.compiler.release=${java_compiler} clean verify -Pdist + mvn -V -B -e -ntp "-Dstyle.color=always" -Dmaven.compiler.release=${java_compiler} ${maven_phases} ${maven_profiles} ARG verify_build=false RUN if ${verify_build} ; then ./contrib/ci/detect-changes.sh ; fi