name: CodeQL

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

on:
  push:
    branches: [ master, release* ]
  pull_request:
    branches: [ master, release* ]
  schedule:
    - cron: '30 7 * * 6'

jobs:
  codeql:
    name: Run CodeQL
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

    - name: Initialize CodeQL
      uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
      with:
        languages: javascript
        queries: +security-extended

    - name: Autobuild
      uses: github/codeql-action/autobuild@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
