|
1 | | -# For most projects, this workflow file will not need changing; you simply need |
2 | | -# to commit it to your repository. |
3 | | -# |
4 | | -# You may wish to alter this file to override the set of languages analyzed, |
5 | | -# or to provide custom queries or build logic. |
6 | | -# |
7 | | -# ******** NOTE ******** |
8 | | -# We have attempted to detect the languages in your repository. Please check |
9 | | -# the `language` matrix defined below to confirm you have the correct set of |
10 | | -# supported CodeQL languages. |
11 | | -# |
12 | | -name: "CodeQL" |
13 | | - |
14 | | -on: [push, pull_request] |
15 | | -#on: |
16 | | -# push: |
17 | | -# branches: [ master-1.12 ] |
18 | | -# pull_request: |
19 | | -# # The branches below must be a subset of the branches above |
20 | | -# branches: [ master-1.12 ] |
21 | | -# types: [opened, synchronize, reopened] |
22 | | -# schedule: |
23 | | -# - cron: '43 7 * * 4' |
| 1 | +name: CodeQL |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master-1.16.5 |
| 7 | + - 'feature/**' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - master-1.16.5 |
| 11 | + schedule: |
| 12 | + - cron: '43 7 * * 4' |
| 13 | + |
| 14 | +permissions: |
| 15 | + actions: read |
| 16 | + contents: read |
| 17 | + security-events: write |
24 | 18 |
|
25 | 19 | jobs: |
26 | 20 | analyze: |
27 | | - name: Analyze |
| 21 | + name: Analyze Java |
28 | 22 | runs-on: ubuntu-latest |
29 | | - permissions: |
30 | | - actions: read |
31 | | - contents: read |
32 | | - security-events: write |
33 | | - |
34 | | - strategy: |
35 | | - fail-fast: false |
36 | | - matrix: |
37 | | - language: [ 'java' ] |
38 | | - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
39 | | - # Learn more: |
40 | | - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed |
| 23 | + timeout-minutes: 45 |
41 | 24 |
|
42 | 25 | steps: |
43 | | - - name: Checkout repository |
44 | | - uses: actions/checkout@v2 |
45 | | - |
46 | | - # Initializes the CodeQL tools for scanning. |
47 | | - - name: Initialize CodeQL |
48 | | - uses: github/codeql-action/init@v1 |
49 | | - with: |
50 | | - languages: ${{ matrix.language }} |
51 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
52 | | - # By default, queries listed here will override any specified in a config file. |
53 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
54 | | - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
55 | | - |
56 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
57 | | - # If this step fails, then you should remove it and run the build manually (see below) |
58 | | - - name: Autobuild |
59 | | - uses: github/codeql-action/autobuild@v1 |
60 | | - |
61 | | - # ℹ️ Command-line programs to run using the OS shell. |
62 | | - # 📚 https://git.io/JvXDl |
63 | | - |
64 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
65 | | - # and modify them (or add more) to build your code if your project |
66 | | - # uses a compiled language |
67 | | - |
68 | | - #- run: | |
69 | | - # make bootstrap |
70 | | - # make release |
71 | | - |
72 | | - - name: Perform CodeQL Analysis |
73 | | - uses: github/codeql-action/analyze@v1 |
| 26 | + - name: Check out source |
| 27 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
| 28 | + |
| 29 | + - name: Install Java 8 toolchain |
| 30 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 31 | + with: |
| 32 | + distribution: temurin |
| 33 | + java-version: '8.0.502+7' |
| 34 | + |
| 35 | + - name: Install Java 17 for Gradle |
| 36 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 37 | + with: |
| 38 | + distribution: microsoft |
| 39 | + java-version: '17' |
| 40 | + |
| 41 | + - name: Set up Gradle |
| 42 | + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 |
| 43 | + |
| 44 | + - name: Initialize CodeQL |
| 45 | + uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 |
| 46 | + with: |
| 47 | + languages: java-kotlin |
| 48 | + |
| 49 | + - name: Compile production code |
| 50 | + run: | |
| 51 | + chmod +x ./gradlew |
| 52 | + ./gradlew clean classes --no-daemon --stacktrace |
| 53 | +
|
| 54 | + - name: Analyze |
| 55 | + uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 |
0 commit comments