You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/maven.yml
+44-18Lines changed: 44 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,9 @@ on:
5
5
push:
6
6
branches:
7
7
- main
8
-
# for PRs from forked repos and non forked repos
9
-
# in order to write status info to the PR we require write repository token (https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/)
10
-
pull_request_target:
8
+
pull_request:
11
9
branches:
12
10
- main
13
-
types: [opened, synchronize, reopened]
14
11
15
12
# restrict privileges except for setting commit status, adding PR comments and writing statuses
16
13
permissions:
@@ -30,11 +27,11 @@ jobs:
30
27
strategy:
31
28
matrix:
32
29
os: [ubuntu-latest, macos-latest, windows-latest]
33
-
jdk: [11, 17]
30
+
jdk: [11, 17, 21, 25]
34
31
include:
35
-
# lengthy build steps should only be performed on linux with Java 11 (SonarQube analysis, deployment)
32
+
# lengthy build steps should only be performed on linux with Java 21 (SonarQube analysis, deployment)
36
33
- os: ubuntu-latest
37
-
jdk: 11
34
+
jdk: 21
38
35
isMainBuildEnv: true
39
36
namePrefix: 'Main '
40
37
fail-fast: false
@@ -44,16 +41,13 @@ jobs:
44
41
45
42
steps:
46
43
- name: Checkout
47
-
uses: actions/checkout@v3
48
-
# always act on the modified source code (even for event pull_request_target)
49
-
# is considered potentially unsafe (https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) but actions are only executed after approval from committers
44
+
uses: actions/checkout@v6
50
45
with:
51
-
ref: ${{ github.event.pull_request.head.sha }}
52
46
# no additional git operations after checkout triggered in workflow, no need to store credentials
53
47
persist-credentials: false
54
48
55
49
- name: Set up JDK
56
-
uses: actions/setup-java@v3
50
+
uses: actions/setup-java@v5
57
51
with:
58
52
cache: 'maven'
59
53
distribution: 'temurin'
@@ -68,11 +62,11 @@ jobs:
68
62
shell: bash
69
63
run: |
70
64
if [ "${{ matrix.isMainBuildEnv }}" = "true" ]; then
0 commit comments