|
1 | | -name: "CodeQL" |
| 1 | +name: CodeQL |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: [ "master" ] |
6 | 4 | pull_request: |
7 | | - branches: [ "master" ] |
| 5 | + branches: [ 'master' ] |
| 6 | + schedule: |
| 7 | + - cron: '0 3 * * 1' |
| 8 | + |
| 9 | +permissions: |
| 10 | + security-events: write |
| 11 | + packages: read |
| 12 | + actions: read |
| 13 | + contents: read |
8 | 14 |
|
9 | 15 | jobs: |
10 | 16 | analyze: |
11 | | - name: Analyze |
| 17 | + name: Analyze (${{ matrix.language }}) |
12 | 18 | runs-on: ubuntu-latest |
13 | 19 |
|
14 | 20 | strategy: |
15 | 21 | fail-fast: false |
16 | 22 | matrix: |
17 | | - language: [ 'java' ] |
| 23 | + include: |
| 24 | + - language: actions |
| 25 | + build-mode: none |
| 26 | + - language: java-kotlin |
| 27 | + build-mode: manual |
18 | 28 |
|
19 | 29 | steps: |
20 | | - - name: Checkout repository |
21 | | - uses: actions/checkout@v4 |
22 | | - |
23 | | - - name: Set up JDK |
24 | | - uses: actions/setup-java@v3 |
25 | | - with: |
26 | | - distribution: 'temurin' |
27 | | - java-version: 21 |
28 | | - |
29 | | - - name: Cache Maven packages |
30 | | - uses: actions/cache@v3 |
31 | | - with: |
32 | | - path: ~/.m2/repository |
33 | | - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
34 | | - restore-keys: | |
35 | | - ${{ runner.os }}-maven- |
36 | | -
|
37 | | - - name: Initialize CodeQL |
38 | | - uses: github/codeql-action/init@v1 |
39 | | - with: |
40 | | - languages: ${{ matrix.language }} |
41 | | - |
42 | | - - name: Build with Maven |
43 | | - run: mvn -B package --file extra/pom.xml |
44 | | - |
45 | | - - name: Perform CodeQL Analysis |
46 | | - uses: github/codeql-action/analyze@v1 |
47 | | - with: |
48 | | - category: "/language:${{ matrix.language }}" |
| 30 | + - name: Checkout repository |
| 31 | + uses: actions/checkout@v5 |
| 32 | + |
| 33 | + - name: Set up JDK |
| 34 | + uses: actions/setup-java@v5 |
| 35 | + with: |
| 36 | + distribution: 'temurin' |
| 37 | + java-version: 21 |
| 38 | + |
| 39 | + - name: Cache Maven packages |
| 40 | + uses: actions/cache@v5 |
| 41 | + with: |
| 42 | + path: ~/.m2/repository |
| 43 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 44 | + restore-keys: | |
| 45 | + ${{ runner.os }}-maven- |
| 46 | +
|
| 47 | + - name: Initialize CodeQL |
| 48 | + uses: github/codeql-action/init@v4 |
| 49 | + with: |
| 50 | + languages: ${{ matrix.language }} |
| 51 | + build-mode: ${{ matrix.build-mode }} |
| 52 | + |
| 53 | + - name: Build with Maven |
| 54 | + if: matrix.build-mode == 'manual' |
| 55 | + run: mvn -B package --file extra/pom.xml |
| 56 | + |
| 57 | + - name: Perform CodeQL Analysis |
| 58 | + uses: github/codeql-action/analyze@v4 |
| 59 | + with: |
| 60 | + category: '/language:${{ matrix.language }}' |
0 commit comments