Skip to content

Commit 50d5712

Browse files
committed
Add CodeQL custom workflow
1 parent 04cbc66 commit 50d5712

File tree

6 files changed

+61
-0
lines changed

6 files changed

+61
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '37 23 * * 6'
10+
11+
permissions: {}
12+
13+
jobs:
14+
analyze:
15+
name: Analyze (${{ matrix.language }})
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- language: actions
24+
build-mode: none
25+
- language: java-kotlin
26+
build-mode: autobuild
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
32+
with:
33+
languages: ${{ matrix.language }}
34+
build-mode: ${{ matrix.build-mode }}
35+
- name: Set up Java
36+
if: matrix.language == 'java-kotlin'
37+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
38+
with:
39+
distribution: 'zulu'
40+
java-version: '21'
41+
cache: 'maven'
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
44+
with:
45+
category: "/language:${{matrix.language}}"

.github/workflows/java-ea.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Java EA
22

33
on: [push]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
710

.github/workflows/macos.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Mac OS CI
22

33
on: push
44

5+
permissions:
6+
contents: read
7+
58
env:
69
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
710

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
710
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
release:
1515
# This job has been inspired by the moditect release (https://github.com/moditect/moditect/blob/main/.github/workflows/release.yml)
1616
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
1719
steps:
1820
- uses: actions/checkout@v4
1921
with:
@@ -92,6 +94,8 @@ jobs:
9294
name: Update Website
9395
needs: [release]
9496
runs-on: ubuntu-latest
97+
permissions:
98+
contents: read
9599
steps:
96100
- name: Checkout
97101
uses: actions/checkout@v4

.github/workflows/windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Windows CI
22

33
on: push
44

5+
permissions:
6+
contents: read
7+
58
env:
69
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
710

0 commit comments

Comments
 (0)