name: 'CodeQL'

on:
  push:
    branches: ['main', '*.*.x']
  schedule:
    - cron: '39 9 * * 1'

permissions: {}

jobs:
  analyze:
    name: Analyze
    runs-on: 'ubuntu-latest'
    permissions:
      security-events: write
      packages: read
    strategy:
      fail-fast: false
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false
      - name: Initialize CodeQL
        uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
        with:
          languages: javascript-typescript
          build-mode: none
          config-file: .github/codeql/config.yml
      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
        with:
          category: '/language:javascript-typescript'
