| 1 | name: "CodeQL" |
| 2 | on: |
| 3 | push: |
| 4 | branches: [ "main" ] |
| 5 | pull_request: |
| 6 | branches: [ "main" ] |
| 7 | schedule: |
| 8 | - cron: '36 1 * * 3' |
| 9 | jobs: |
| 10 | analyze: |
| 11 | name: Analyze (${{ matrix.language }}) |
| 12 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 13 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} |
| 14 | permissions: |
| 15 | security-events: write |
| 16 | packages: read |
| 17 | actions: read |
| 18 | contents: read |
| 19 | strategy: |
| 20 | fail-fast: false |
| 21 | matrix: |
| 22 | include: |
| 23 | - language: javascript-typescript |
| 24 | build-mode: none |
| 25 | - language: python |
| 26 | build-mode: none |
| 27 | steps: |
| 28 | - name: Checkout repository |
| 29 | uses: actions/checkout@v4 |
| 30 | - name: Initialize CodeQL |
| 31 | uses: github/codeql-action/init@v3 |
| 32 | with: |
| 33 | languages: ${{ matrix.language }} |
| 34 | build-mode: ${{ matrix.build-mode }} |
| 35 | - if: matrix.build-mode == 'manual' |
| 36 | shell: bash |
| 37 | run: | |
| 38 | echo 'Replace this with your build commands' |
| 39 | exit 1 |
| 40 | - name: Perform CodeQL Analysis |
| 41 | uses: github/codeql-action/analyze@v3 |
| 42 | with: |
| 43 | category: "/language:${{matrix.language}}" |