|
| 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", release/stable ] |
| 17 | + pull_request: |
| 18 | + branches: [ "main" ] |
| 19 | + schedule: |
| 20 | + - cron: '35 1 * * 5' |
| 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 | + actions: read |
| 29 | + contents: read |
| 30 | + security-events: write |
| 31 | + |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + include: |
| 36 | + - language: javascript-typescript |
| 37 | + build-mode: none |
| 38 | + steps: |
| 39 | + - name: Checkout repository |
| 40 | + uses: actions/checkout@v4 |
| 41 | + |
| 42 | + # Initializes the CodeQL tools for scanning. |
| 43 | + - name: Initialize CodeQL |
| 44 | + uses: github/codeql-action/init@v3 |
| 45 | + with: |
| 46 | + languages: ${{ matrix.language }} |
| 47 | + config-file: ./.github/codeql/codeql-config.yml |
| 48 | + |
| 49 | + - name: Setup Node.js environment |
| 50 | + uses: actions/setup-node@v3 |
| 51 | + with: |
| 52 | + node-version: 16.x |
| 53 | + registry-url: https://npm.pkg.github.com |
| 54 | + |
| 55 | + - name: Install npm@9 |
| 56 | + run: npm i -g npm@9 |
| 57 | + |
| 58 | + - name: Build and test |
| 59 | + run: | |
| 60 | + npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GPR_ACCESS_TOKEN }} |
| 61 | + npm ci |
| 62 | + npm run ci |
| 63 | + env: |
| 64 | + AZ_DevOps_Read_PAT: ${{ secrets.AZ_DevOps_Read_PAT }} |
| 65 | + |
| 66 | + - name: Perform CodeQL Analysis |
| 67 | + uses: github/codeql-action/analyze@v3 |
| 68 | + with: |
| 69 | + category: "/language:${{matrix.language}}" |
0 commit comments