name: Code scanning

on:
  push:
  pull_request:
  schedule:
    - cron: '0 19 * * 0'

env:
  HAS_SECRETS: ${{ secrets.HAS_SECRETS }}

jobs:
  CodeQL-Build:
    runs-on: ubuntu-18.04
    name: Code scanning
    timeout-minutes: 15

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Autobuild
        uses: github/codeql-action/autobuild@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

name: Code scanning

on:
  push:
  pull_request:
  schedule:
    - cron: '0 19 * * 0'

env:
  HAS_SECRETS: ${{ secrets.HAS_SECRETS }}

jobs:
  CodeQL-Build:
    runs-on: ubuntu-20.04
    name: Code scanning
    timeout-minutes: 15

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Autobuild
        uses: github/codeql-action/autobuild@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v1
        if: env.HAS_SECRETS == 'HAS_SECRETS'

Upgrade used Ubuntu version in CodeQL
Upgrade used Ubuntu version in CodeQL
