Skip to content

Commit

Permalink
chore(170): use built-in Maven cache mechanism of setup-java GitHub
Browse files Browse the repository at this point in the history
Action

fixes com-pas#170

Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Feb 3, 2023
1 parent 1692b64 commit ba92e5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ jobs:
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Docker Buildx
id: buildx
Expand All @@ -45,6 +39,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'

- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v21
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Extract tag name
id: extract_tagname
Expand All @@ -43,6 +37,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,13 @@ jobs:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'

- name: Set Common Sonar Variables
id: sonar_env
Expand Down

0 comments on commit ba92e5f

Please sign in to comment.