name: "Code scanning"

on:
  push:
    branches-ignore:
      - dependabot/** # https://github.com/github/codeql-action/pull/435
  pull_request: {}

jobs:
  CodeQL:
    if: ${{!github.event.repository.private}}
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v2

      # Initializes the CodeQL tools for scanning.
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v1

        # Override language selection by uncommenting this and choosing your languages
        # with:
        #   languages: go, javascript, csharp, python, cpp, java

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v1
