name: "CodeQL"

on:
  push:
    branches: ["develop"]
  pull_request:
    branches: ["develop"]
  schedule:
    - cron: "0 0 * * 5"

permissions: "read-all"

jobs:
  analyze:
    name: "Analyze"
    runs-on: "ubuntu-latest"
    permissions:
      actions: read
      contents: read
      security-events: write
    steps:
    - name: "Checkout repository"
      uses: "actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3"
      with:
        persist-credentials: false

    - name: "Run CodeQL init"
      uses: "github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13"
      with:
        config-file: "./.github/codeql.yml"
        languages: "python"

    - name: "Run CodeQL autobuild"
      uses: "github/codeql-action/autobuild@c10b8064de6f491fea524254123dbe5e09572f13"

    - name: "Run CodeQL analyze"
      uses: "github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13"
