···11+name: "Code scanning - action"
22+33+on:
44+ push:
55+ pull_request:
66+ schedule:
77+ - cron: '0 18 * * 6'
88+99+jobs:
1010+ CodeQL-Build:
1111+ runs-on: ubuntu-latest
1212+1313+ steps:
1414+ - name: Checkout repository
1515+ uses: actions/checkout@v2
1616+ with:
1717+ # We must fetch at least the immediate parents so that if this is
1818+ # a pull request then we can checkout the head.
1919+ fetch-depth: 2
2020+2121+ # If this run was triggered by a pull request event, then checkout
2222+ # the head of the pull request instead of the merge commit.
2323+ - run: git checkout HEAD^2
2424+ if: ${{ github.event_name == 'pull_request' }}
2525+2626+ # Initializes the CodeQL tools for scanning.
2727+ - name: Initialize CodeQL
2828+ uses: github/codeql-action/init@v1
2929+ # Override language selection by uncommenting this and choosing your languages
3030+ with:
3131+ languages:
3232+ - go
3333+3434+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
3535+ # If this step fails, then you should remove it and run the build manually (see below)
3636+ - name: Autobuild
3737+ uses: github/codeql-action/autobuild@v1
3838+3939+ - name: Perform CodeQL Analysis
4040+ uses: github/codeql-action/analyze@v1