codeql-analysis.yml 2.5 KB

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