Skip to content

Commit f1910ca

Browse files
committed
[GHA] Update github actions
1 parent 1aba9ca commit f1910ca

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

Diff for: .github/workflows/ci.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10+
cache: [maven]
11+
distribution: [temurin]
12+
java: [11, 17, 21, 22, 23-ea]
1013
os: [ubuntu-latest, macos-latest, windows-latest]
11-
java: [17, 21, 22-ea]
12-
distribution: ['temurin']
1314
fail-fast: false
1415
max-parallel: 4
1516
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
@@ -21,5 +22,6 @@ jobs:
2122
with:
2223
java-version: ${{ matrix.java }}
2324
distribution: ${{ matrix.distribution }}
25+
cache: ${{ matrix.cache }}
2426
- name: Test with Maven
2527
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"log.level.thymeleaf.config=info"

Diff for: .github/workflows/coveralls.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ jobs:
1111
- name: Set up JDK
1212
uses: actions/setup-java@v4
1313
with:
14+
cache: maven
15+
distribution: temurin
1416
java-version: 21
15-
distribution: zulu
1617
- name: Report Coverage to Coveralls for Pull Requests
1718
if: github.event_name == 'pull_request'
1819
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress

Diff for: .github/workflows/site.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,18 @@ jobs:
1414
- name: Set up JDK
1515
uses: actions/setup-java@v4
1616
with:
17+
cache: maven
18+
distribution: temurin
1719
java-version: 21
18-
distribution: zulu
19-
- uses: webfactory/ssh-agent@master
20-
with:
21-
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
2220
- name: Build site
23-
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
21+
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress --settings ./.mvn/settings.xml
2422
env:
2523
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2624
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
2726
- name: Deploy Site to gh-pages
28-
uses: JamesIves/github-pages-deploy-action@v4.6.3
27+
uses: JamesIves/github-pages-deploy-action@v4
2928
with:
30-
ssh-key: true
3129
branch: gh-pages
3230
folder: target/staging
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
ssh-key: ${{ secrets.DEPLOY_KEY }}

Diff for: .github/workflows/sonar.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
- name: Set up JDK
1818
uses: actions/setup-java@v4
1919
with:
20+
cache: maven
21+
distribution: temurin
2022
java-version: 21
21-
distribution: zulu
2223
- name: Analyze with SonarCloud
23-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
24+
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
2425
env:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2627
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Diff for: .github/workflows/sonatype.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ jobs:
1414
- name: Set up JDK
1515
uses: actions/setup-java@v4
1616
with:
17+
cache: maven
18+
distribution: temurin
1719
java-version: 21
18-
distribution: zulu
1920
- name: Deploy to Sonatype
2021
run: ./mvnw deploy -DskipTests -B -V -Dlog.level.thymeleaf.config=info --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
2122
env:

0 commit comments

Comments
 (0)