Skip to content

Commit 193ab77

Browse files
committed
[GHA] Update github actions
1 parent 6c54ad2 commit 193ab77

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
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]
11-
java: [11, 17, 21, 22-ea]
12-
distribution: ['temurin']
1314
fail-fast: false
1415
max-parallel: 4
1516
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
@@ -22,5 +23,6 @@ jobs:
2223
with:
2324
java-version: ${{ matrix.java }}
2425
distribution: ${{ matrix.distribution }}
26+
cache: ${{ matrix.cache }}
2527
- name: Test with Maven
2628
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"

.github/workflows/coveralls.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ jobs:
1212
- name: Set up JDK
1313
uses: actions/setup-java@v4
1414
with:
15+
cache: maven
16+
distribution: temurin
1517
java-version: 21
16-
distribution: zulu
1718
- name: Report Coverage to Coveralls for Pull Requests
1819
if: github.event_name == 'pull_request'
1920
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress

.github/workflows/site.yaml

Lines changed: 6 additions & 9 deletions
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.1
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 }}

.github/workflows/sonar.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ jobs:
1818
- name: Set up JDK
1919
uses: actions/setup-java@v4
2020
with:
21+
cache: maven
22+
distribution: temurin
2123
java-version: 21
22-
distribution: zulu
2324
- name: Analyze with SonarCloud
24-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_memcached-cache -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
25+
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dsonar.projectKey=mybatis_memcached-cache -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
2526
env:
2627
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2728
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
- name: Set up JDK
1616
uses: actions/setup-java@v4
1717
with:
18+
cache: maven
19+
distribution: temurin
1820
java-version: 21
19-
distribution: zulu
2021
- name: Deploy to Sonatype
2122
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
2223
env:

0 commit comments

Comments
 (0)