name: CodeQL
on:
  schedule:
    # every day at midnight
    - cron: "0 0 * * *"

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

permissions: {}

jobs:
  analyze:
    runs-on: ubuntu-24.04
    permissions:
      actions: read
      contents: read
      security-events: write
    if: github.repository_owner == 'pandas-dev'

    strategy:
      fail-fast: false
      matrix:
        language:
          - python

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
        with:
          languages: ${{ matrix.language }}
      - uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
      - uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
