name: CodeQL

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
  # Run on every 1st and 15th of the month.
  schedule:
    - cron: 0 12 1,15 * *

jobs:
  analyze:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
    strategy:
      fail-fast: false
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v2
        with:
          config-file: ./.github/codeql-configuration.yml
          languages: javascript
      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v2