From fe788de3d8d15c0aa655584101d73e39a03c4fab Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Fri, 10 Apr 2020 15:31:31 -0700 Subject: [PATCH] Enable build caching Signed-off-by: Ashcon Partovi --- .github/workflows/build.yml | 9 ++++++++- .github/workflows/deploy.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15ad09c530..b4a6359b80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,14 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: cache + uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: format run: mvn com.coveo:fmt-maven-plugin:check - name: build - run: mvn -U install + run: mvn install diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 28aa3fd64c..a52e4fe861 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,13 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: cache + uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: format run: mvn com.coveo:fmt-maven-plugin:check - name: version @@ -25,7 +32,7 @@ jobs: mvn versions:set \ -DnewVersion=1.8-${GITHUB_REF#refs/heads/}-SNAPSHOT - name: nexus - run: mvn -U deploy -s settings.xml + run: mvn deploy -s settings.xml env: NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}