codeql-analysis.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. # The branches below must be a subset of the branches above
  7. branches: [master]
  8. schedule:
  9. - cron: '0 16 * * 5'
  10. jobs:
  11. analyze:
  12. name: Analyze
  13. runs-on: ubuntu-latest
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. # Override automatic language detection by changing the below list
  18. # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
  19. language: ['go']
  20. # Learn more...
  21. # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
  22. steps:
  23. - name: Checkout repository
  24. uses: actions/checkout@v2
  25. with:
  26. # We must fetch at least the immediate parents so that if this is
  27. # a pull request then we can checkout the head.
  28. fetch-depth: 2
  29. # If this run was triggered by a pull request event, then checkout
  30. # the head of the pull request instead of the merge commit.
  31. - run: git checkout HEAD^2
  32. if: ${{ github.event_name == 'pull_request' }}
  33. # Initializes the CodeQL tools for scanning.
  34. - name: Initialize CodeQL
  35. uses: github/codeql-action/init@v1
  36. with:
  37. languages: ${{ matrix.language }}
  38. # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
  39. # If this step fails, then you should remove it and run the build manually (see below)
  40. - name: Autobuild
  41. uses: github/codeql-action/autobuild@v1
  42. # ℹ️ Command-line programs to run using the OS shell.
  43. # 📚 https://git.io/JvXDl
  44. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  45. # and modify them (or add more) to build your code if your project
  46. # uses a compiled language
  47. #- run: |
  48. # make bootstrap
  49. # make release
  50. - name: Perform CodeQL Analysis
  51. uses: github/codeql-action/analyze@v1