Skip to content

Commit 4eeb6ea

Browse files
authored
ci: add CodeQL analysis workflow configuration (#13)
1 parent a88f8fc commit 4eeb6ea

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)