codeql-analysis.yml 2.3 KB

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