|
| 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. |
| 3 | +# |
| 4 | +# You may wish to alter this file to override the set of languages analyzed, |
| 5 | +# or to provide custom queries or build logic. |
| 6 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
| 12 | +name: "CodeQL Advanced" |
| 13 | + |
| 14 | +on: |
| 15 | + push: |
| 16 | + branches: [ "main" ] |
| 17 | + pull_request: |
| 18 | + branches: [ "main" ] |
| 19 | + schedule: |
| 20 | + - cron: '30 19 * * 3' |
| 21 | + |
| 22 | +jobs: |
| 23 | + analyze: |
| 24 | + name: Analyze (${{ matrix.language }}) |
| 25 | + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 26 | + permissions: |
| 27 | + # required for all workflows |
| 28 | + security-events: write |
| 29 | + |
| 30 | + # required to fetch internal or private CodeQL packs |
| 31 | + packages: read |
| 32 | + |
| 33 | + # only required for workflows in private repositories |
| 34 | + actions: read |
| 35 | + contents: read |
| 36 | + |
| 37 | + strategy: |
| 38 | + fail-fast: false |
| 39 | + matrix: |
| 40 | + include: |
| 41 | + - language: swift |
| 42 | + build-mode: autobuild |
| 43 | + steps: |
| 44 | + - name: Checkout repository |
| 45 | + uses: actions/checkout@v4 |
| 46 | + |
| 47 | + # Initializes the CodeQL tools for scanning. |
| 48 | + - name: Initialize CodeQL |
| 49 | + uses: github/codeql-action/init@v3 |
| 50 | + with: |
| 51 | + languages: ${{ matrix.language }} |
| 52 | + build-mode: ${{ matrix.build-mode }} |
| 53 | + - if: matrix.build-mode == 'manual' |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + echo 'If you are using a "manual" build mode for one or more of the' \ |
| 57 | + 'languages you are analyzing, replace this with the commands to build' \ |
| 58 | + 'your code, for example:' |
| 59 | + echo ' make bootstrap' |
| 60 | + echo ' make release' |
| 61 | + exit 1 |
| 62 | +
|
| 63 | + - name: Perform CodeQL Analysis |
| 64 | + uses: github/codeql-action/analyze@v3 |
| 65 | + with: |
| 66 | + category: "/language:${{matrix.language}}" |
0 commit comments