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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0"
      with:
        persist-credentials: false

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

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

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