Skip to content

Commit 9eb0402

Browse files
committed
add codeql workflow
1 parent 5aa9e83 commit 9eb0402

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "CodeQL"
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
schedule:
7+
- cron: "27 1 * * 0"
8+
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
# Runner size impacts CodeQL analysis time. To learn more, please see:
13+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
14+
# - https://gh.io/supported-runners-and-hardware-resources
15+
# - https://gh.io/using-larger-runners (GitHub.com only)
16+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
17+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
18+
permissions:
19+
# required for all workflows
20+
security-events: write
21+
22+
# required to fetch internal or private CodeQL packs
23+
packages: read
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
include:
29+
- language: actions
30+
build-mode: none
31+
- language: java-kotlin
32+
build-mode: none
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
# Add any setup steps before running the `github/codeql-action/init` action.
38+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
39+
# or others). This is typically only required for manual builds.
40+
# - name: Setup runtime (example)
41+
# uses: actions/setup-example@v1
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v4
46+
with:
47+
languages: ${{ matrix.language }}
48+
build-mode: ${{ matrix.build-mode }}
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@v4
52+
with:
53+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)