|
1 |
| - |
2 | 1 | name: "CodeQL"
|
3 | 2 |
|
4 | 3 | on:
|
5 | 4 | push:
|
6 |
| - branches: [develop, main] |
| 5 | + branches: [ "develop" ] |
7 | 6 | pull_request:
|
8 |
| - branches: [develop] |
| 7 | + branches: [ "develop" ] |
9 | 8 | schedule:
|
10 |
| - - cron: '0 8 * * 0' |
| 9 | + - cron: '38 22 * * 1' |
11 | 10 |
|
12 | 11 | jobs:
|
13 |
| - analyse: |
14 |
| - name: Analyse |
15 |
| - runs-on: ubuntu-latest |
16 |
| - if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" |
| 12 | + analyze: |
| 13 | + name: Analyze |
| 14 | + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 15 | + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} |
| 16 | + permissions: |
| 17 | + actions: read |
| 18 | + contents: read |
| 19 | + security-events: write |
| 20 | + |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + language: [ 'java-kotlin' ] |
| 25 | + |
17 | 26 | steps:
|
18 |
| - - uses: whelk-io/maven-settings-xml-action@v21 |
| 27 | + - name: Checkout repository |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Initialize CodeQL |
| 31 | + uses: github/codeql-action/init@v3 |
| 32 | + with: |
| 33 | + languages: java |
| 34 | + |
| 35 | + - name: Generate Maven settings |
| 36 | + uses: whelk-io/maven-settings-xml-action@v21 |
19 | 37 | with:
|
20 | 38 | repositories: >
|
21 | 39 | [
|
@@ -60,28 +78,19 @@ jobs:
|
60 | 78 | "github"
|
61 | 79 | ]
|
62 | 80 | output_file: .m2/settings.xml
|
63 |
| - - uses: actions/checkout@v4 |
64 |
| - with: |
65 |
| - fetch-depth: 2 |
66 |
| - - uses: actions/setup-java@v4 |
| 81 | + |
| 82 | + - name: Setup Java |
| 83 | + uses: actions/setup-java@v4 |
67 | 84 | with:
|
68 | 85 | distribution: 'temurin'
|
69 | 86 | java-version: '20'
|
70 | 87 | overwrite-settings: 'false'
|
71 |
| - - uses: actions/cache@v3 |
72 |
| - with: |
73 |
| - path: ~/.m2/repository |
74 |
| - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
75 |
| - restore-keys: | |
76 |
| - ${{ runner.os }}-maven- |
77 |
| - - name: Initialize CodeQL |
78 |
| - uses: github/codeql-action/init@v2 |
79 |
| - with: |
80 |
| - languages: java |
| 88 | + |
81 | 89 | - name: Build
|
82 |
| - run: mvn -B compile |
| 90 | + run: mvn -s ${{ github.workspace }}/.m2/settings.xml -B compile |
83 | 91 | env:
|
84 | 92 | PACKAGES_USER: ${{ secrets.PACKAGES_USER }}
|
85 | 93 | PACKAGES_ACCESS_TOKEN: ${{ secrets.PACKAGES_ACCESS_TOKEN }}
|
| 94 | + |
86 | 95 | - name: Perform CodeQL Analysis
|
87 |
| - uses: github/codeql-action/analyze@v2 |
| 96 | + uses: github/codeql-action/analyze@v3 |
0 commit comments