on:
  pull_request:
    paths-ignore:
      - 'README.md'
      - 'CONTRIBUTING.md'
      - 'COPYING'
      - 'website/**'
      - '.github/*.md'
      - '.github/FUNDING.yml'
  push:
    branches:
      - main

name: Code QL
jobs:
  code-ql:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ${{ github.workspace }}/src
    steps:
    - name: Install Go
      uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
      with:
        go-version: 1.20.2
    - name: Checkout code
      uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
    - name: Initialize CodeQL
      uses: github/codeql-action/init@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
      with:
        languages: go
    - name: Autobuild
      uses: github/codeql-action/autobuild@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
