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@d632683dd7b4114ad314bca15554477dd762a938"

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

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

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