Skip to content

Commit

Permalink
Set actions/setup-java to use cache (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek authored Dec 18, 2024
1 parent 60e4a25 commit ef4c9dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
- name: Cache Maven Packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
cache: 'maven'
- name: Build with Maven
run: mvn -B --no-transfer-progress package --file pom.xml -Dsurefire.skipAfterFailureCount=1
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

- name: Set env for master(latest) release
if: github.ref_name == 'master'
Expand All @@ -32,13 +33,6 @@ jobs:
run: |
echo "RELEASE_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Cache Maven Packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build project
run: mvn -B --no-transfer-progress package -Passembly --file pom.xml -Drevision=${{ env.RELEASE_NAME }}

Expand Down

0 comments on commit ef4c9dc

Please sign in to comment.