Skip to content

Commit f7794bd

Browse files
committed
Fix CodeQL workflow
1 parent 8bcb7a1 commit f7794bd

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1-
21
name: "CodeQL"
32

43
on:
54
push:
6-
branches: [develop, main]
5+
branches: [ "develop" ]
76
pull_request:
8-
branches: [develop]
7+
branches: [ "develop" ]
98
schedule:
10-
- cron: '0 8 * * 0'
9+
- cron: '38 22 * * 1'
1110

1211
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+
1726
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
1937
with:
2038
repositories: >
2139
[
@@ -60,28 +78,19 @@ jobs:
6078
"github"
6179
]
6280
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
6784
with:
6885
distribution: 'temurin'
6986
java-version: '20'
7087
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+
8189
- name: Build
82-
run: mvn -B compile
90+
run: mvn -s ${{ github.workspace }}/.m2/settings.xml -B compile
8391
env:
8492
PACKAGES_USER: ${{ secrets.PACKAGES_USER }}
8593
PACKAGES_ACCESS_TOKEN: ${{ secrets.PACKAGES_ACCESS_TOKEN }}
94+
8695
- name: Perform CodeQL Analysis
87-
uses: github/codeql-action/analyze@v2
96+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)