name: CodeQL

on:
  push:
    branches:
      - master
  pull_request:
  schedule:
    - cron: '0 5 * * 3'

jobs:
  codeql:
    runs-on: ubuntu-latest
    name: "CodeQL"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: 11
          distribution: 'temurin'
          cache: 'maven'
      - name: CodeQL Initialization
        uses: github/codeql-action/init@v1
        with:
          languages: java
          queries: +security-and-quality
      - name: Autobuild
        uses: github/codeql-action/autobuild@v1
      - name: CodeQL Analysis
        uses: github/codeql-action/analyze@v1
