1+ name : " CodeQL Analysis"
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ # The branches below must be a subset of the branches above
8+ branches : [ main, develop ]
9+ schedule :
10+ - cron : ' 30 1 * * 1' # Run weekly on Monday at 01:30 UTC
11+
12+ permissions :
13+ security-events : write # Required to upload CodeQL results
14+
15+ jobs :
16+ analyze :
17+ name : Analyze Code
18+ runs-on : ubuntu-latest
19+
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ # Specify 'javascript-typescript' to analyze both JavaScript and TypeScript
24+ language : [ 'javascript-typescript' ]
25+ # Add other languages here if needed in the future
26+
27+ steps :
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+
31+ # Initializes the CodeQL tools for scanning.
32+ - name : Initialize CodeQL
33+ uses : github/codeql-action/init@v3
34+ with :
35+ languages : ${{ matrix.language }}
36+ # If you wish to specify custom queries, you can do so here
37+ # queries: security-extended,security-and-quality
38+
39+ # Install pnpm
40+ - name : Setup pnpm
41+ uses : pnpm/action-setup@v4
42+ with :
43+ version : 10 # Specify your pnpm version if needed
44+
45+ # Install dependencies using pnpm
46+ - name : Install dependencies
47+ run : pnpm install
48+
49+ # Build the project using pnpm
50+ - name : Build project
51+ run : pnpm build
52+
53+ # Perform CodeQL Analysis
54+ - name : Perform CodeQL Analysis
55+ uses : github/codeql-action/analyze@v3
56+ with :
57+ category : " /language:${{matrix.language}}"
0 commit comments