]> begriffs open source - cmsis/blob - .github/workflows/codeql-analysis.yml
GitHub: Update CodeQL workflow to use version 2 actions.
[cmsis] / .github / workflows / codeql-analysis.yml
1 name: "CodeQL"
2
3 on:
4   workflow_dispatch:
5   push:
6     branches: [ develop ]
7     paths:
8       - 'CMSIS/Core/**'
9       - 'CMSIS/Core_A/**'
10       - 'CMSIS/CoreValidation/**'
11       - 'Device/ARM/**'
12   pull_request:
13     branches: [ develop ]
14     paths:
15       - '.github/workflows/codeql-analysis.yml'
16       - 'CMSIS/Core/**'
17       - 'CMSIS/Core_A/**'
18       - 'CMSIS/CoreValidation/**'
19       - 'Device/ARM/**'
20 jobs:
21   analyze:
22     name: Analyze
23     runs-on: ubuntu-latest
24     container: 
25       image: ghcr.io/jonatanantoni/cmsis/linux.gnu:latest
26     permissions:
27       actions: read
28       contents: read
29       security-events: write
30
31     steps:
32     - name: Checkout repository
33       uses: actions/checkout@v2
34
35     # Initializes the CodeQL tools for scanning.
36     - name: Initialize CodeQL
37       uses: github/codeql-action/init@v2
38       with:
39         languages: cpp
40         queries: security-and-quality
41   
42     - run: |
43        ln -s /root/.rtebuild /github/home/.rtebuild
44        cd CMSIS/CoreValidation/Tests
45        python3 build.py -c GCC -o low build
46
47     - name: Perform CodeQL Analysis
48       uses: github/codeql-action/analyze@v2