15
15
# limitations under the License.
16
16
#
17
17
18
- name : " CodeQL "
18
+ name : codeql-analysis
19
19
20
20
on :
21
21
push :
22
- branches : [ 2.x ]
22
+ branches : [ " 2.x", "main" ]
23
23
pull_request :
24
- # The branches below must be a subset of the branches provided in `on.push.branches`
25
- branches : [ 2.x ]
24
+ branches : [ "2.x", "main" ]
26
25
schedule :
27
26
- cron : ' 32 12 * * 5'
28
27
@@ -31,51 +30,13 @@ permissions: read-all
31
30
jobs :
32
31
33
32
analyze :
34
- name : Analyze
35
- runs-on : ubuntu-latest
33
+ uses : apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@main
34
+ with :
35
+ java-version : |
36
+ 11
37
+ 8
38
+ # Permissions required to publish Security Alerts
36
39
permissions :
37
40
actions : read
38
41
contents : read
39
42
security-events : write
40
-
41
- strategy :
42
- fail-fast : false
43
- matrix :
44
- language : [ 'java' ]
45
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
46
- # Learn more about CodeQL language support at https://git.io/codeql-language-support
47
-
48
- steps :
49
-
50
- - name : Checkout repository
51
- uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
52
-
53
- # Initializes the CodeQL tools for scanning.
54
- - name : Initialize CodeQL
55
- uses : github/codeql-action/init@2cb752a87e96af96708ab57187ab6372ee1973ab # 2.22.0
56
- with :
57
- languages : ${{ matrix.language }}
58
- # If you wish to specify custom queries, you can do so here or in a config file.
59
- # By default, queries listed here will override any specified in a config file.
60
- # Prefix the list here with "+" to use these queries and those in the config file.
61
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
62
-
63
- # JDK 11 is used for the build.
64
- - name : Setup JDK
65
- uses : actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # 3.13.0
66
- with :
67
- distribution : temurin
68
- java-version : 11
69
- cache : maven
70
-
71
- - name : Build with Maven
72
- timeout-minutes : 60
73
- shell : bash
74
- run : |
75
- ./mvnw \
76
- --show-version --batch-mode --errors --no-transfer-progress \
77
- -DskipTests -P!java8-tests \
78
- clean verify
79
-
80
- - name : Perform CodeQL Analysis
81
- uses : github/codeql-action/analyze@2cb752a87e96af96708ab57187ab6372ee1973ab # 2.22.0
0 commit comments