Skip to content

Commit e153031

Browse files
authored
Merge pull request #1164 from hazendaz/master
[gha] Update actions
2 parents 7916ee0 + 1af8db7 commit e153031

File tree

6 files changed

+69
-40
lines changed

6 files changed

+69
-40
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@ on: [workflow_dispatch, push, pull_request]
44

55
permissions: read-all
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
test:
913
runs-on: ${{ matrix.os }}
14+
timeout-minutes: 30
1015
strategy:
1116
matrix:
1217
cache: [maven]
1318
distribution: [temurin]
14-
java: [17, 21, 24, 25-ea]
19+
java: [21, 25, 26-ea]
1520
os: [macos-latest, ubuntu-latest, windows-latest]
1621
fail-fast: false
17-
max-parallel: 4
22+
max-parallel: 6
1823
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
1924

2025
steps:
21-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
2227
- name: Setup Java ${{ matrix.java }} ${{ matrix.distribution }}
23-
uses: actions/setup-java@v5
28+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
2429
with:
2530
cache: ${{ matrix.cache }}
2631
distribution: ${{ matrix.distribution }}
2732
java-version: ${{ matrix.java }}
2833
- name: Test with Maven
29-
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"
34+
run: ./mvnw test --batch-mode --no-transfer-progress --show-version -D"license.skip=true"

.github/workflows/codeql.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,40 @@ on:
66
pull_request:
77
branches: [ master ]
88
schedule:
9-
- cron: '37 14 * * 6'
9+
- cron: '43 10 * * 2'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
1014

1115
jobs:
1216
analyze:
1317
name: Analyze
14-
runs-on: ubuntu-latest
15-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
18+
runs-on: 'ubuntu-latest'
19+
timeout-minutes: 30
1620
permissions:
1721
actions: read
1822
contents: read
1923
security-events: write
2024

21-
strategy:
22-
fail-fast: false
23-
matrix:
24-
language: [ java-kotlin ]
25-
2625
steps:
2726
- name: Checkout
28-
uses: actions/checkout@v6
27+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
2928

3029
- name: Setup Java
31-
uses: actions/setup-java@v5
30+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
3231
with:
3332
cache: maven
3433
distribution: 'temurin'
35-
java-version: 21
34+
java-version: 25
3635

3736
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v4
37+
uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4
3938
with:
40-
languages: ${{ matrix.language }}
4139
queries: +security-and-quality
4240

4341
- name: Autobuild
44-
uses: github/codeql-action/autobuild@v4
42+
uses: github/codeql-action/autobuild@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4
4543

4644
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@v4
48-
with:
49-
category: "/language:${{ matrix.language }}"
45+
uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4

.github/workflows/coveralls.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,33 @@ on: [push, pull_request]
44

55
permissions: read-all
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
coveralls:
913
if: github.repository_owner == 'mybatis'
1014
runs-on: ubuntu-latest
15+
timeout-minutes: 30
1116
steps:
12-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
1318
- name: Setup Java
14-
uses: actions/setup-java@v5
19+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1520
with:
1621
cache: maven
1722
distribution: temurin
18-
java-version: 21
23+
java-version: 25
24+
- name: Run the build
25+
run: ./mvnw test --batch-mode --no-transfer-progress --quiet --show-version -Dlicense.skip=true
1926
- name: Report Coverage to Coveralls for Pull Requests
2027
if: github.event_name == 'pull_request'
21-
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
28+
run: ./mvnw generate-sources jacoco:report coveralls:report --batch-mode --no-transfer-progress -DpullRequest=${{ env.PR_NUMBER }} -DrepoToken=${{ env.GITHUB_TOKEN }} -DserviceName=github
2229
env:
2330
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2431
PR_NUMBER: ${{ github.event.number }}
2532
- name: Report Coverage to Coveralls for General Push
2633
if: github.event_name == 'push'
27-
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
34+
run: ./mvnw generate-sources jacoco:report coveralls:report --batch-mode --no-transfer-progress -DrepoToken=${{ env.GITHUB_TOKEN }} -DserviceName=github
2835
env:
2936
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/site.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@ on:
88
permissions:
99
contents: write
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build:
1317
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
1418
runs-on: ubuntu-latest
19+
timeout-minutes: 60
1520
steps:
16-
- uses: actions/checkout@v6
21+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
1722
- name: Setup Java
18-
uses: actions/setup-java@v5
23+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1924
with:
2025
cache: maven
2126
distribution: temurin
22-
java-version: 21
27+
java-version: 25
2328
- name: Build site
24-
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress --settings ./.mvn/settings.xml
29+
run: ./mvnw site site:stage --batch-mode --no-transfer-progress --settings ./.mvn/settings.xml --show-version -Dlicense.skip=true -DskipTests
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2732
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
2833
- name: Deploy Site to gh-pages
29-
uses: JamesIves/github-pages-deploy-action@v4
34+
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # v4
3035
with:
3136
branch: gh-pages
3237
folder: target/staging

.github/workflows/sonar.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,34 @@ on:
77

88
permissions: read-all
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
SONAR_ORGANIZATION: mybatis
16+
SONAR_PROJECT_KEY: spring
17+
1018
jobs:
1119
build:
1220
if: github.repository_owner == 'mybatis'
1321
runs-on: ubuntu-latest
22+
timeout-minutes: 30
1423
steps:
15-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
1625
with:
1726
# Disabling shallow clone is recommended for improving relevancy of reporting
1827
fetch-depth: 0
1928
- name: Setup Java
20-
uses: actions/setup-java@v5
29+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
2130
with:
2231
cache: maven
2332
distribution: temurin
24-
java-version: 21
33+
java-version: 25
34+
- name: Set SONAR_SCANNER_JAVA_OPTS
35+
run: echo "SONAR_SCANNER_JAVA_OPTS=-Xmx512m" >> ${GITHUB_ENV}
2536
- name: Analyze with SonarCloud
26-
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dsonar.projectKey=mybatis_spring -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress -Dsonar.scanner.skipJreProvisioning=true
37+
run: ./mvnw verify jacoco:report sonar:sonar --batch-mode --no-transfer-progress --show-version -Dlicense.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ env.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ env.SONAR_ORGANIZATION }}_${{ env.SONAR_PROJECT_KEY }} -Dsonar.scanner.skipJreProvisioning=true -Dsonar.token=${{ env.SONAR_TOKEN }}
2738
env:
2839
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2940
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ on:
77

88
permissions: read-all
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
build:
1216
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
1317
runs-on: ubuntu-latest
18+
timeout-minutes: 30
1419
steps:
15-
- uses: actions/checkout@v6
20+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
1621
- name: Setup Java
17-
uses: actions/setup-java@v5
22+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1823
with:
1924
cache: maven
2025
distribution: temurin
21-
java-version: 21
26+
java-version: 25
2227
- name: Deploy to Sonatype
23-
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
28+
run: ./mvnw deploy --batch-mode --no-transfer-progress --settings ./.mvn/settings.xml --show-version -Dlicense.skip=true -DskipTests
2429
env:
2530
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2631
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

0 commit comments

Comments
 (0)