codeql-analysis.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # For more info see https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-on-push
  2. name: "Code scanning"
  3. on:
  4. push:
  5. branches: [main]
  6. paths-ignore:
  7. - '**/*.md'
  8. - '**/*.txt'
  9. - '**/*.html'
  10. - docs
  11. - docfx
  12. pull_request:
  13. branches: [main]
  14. paths-ignore:
  15. - '**/*.md'
  16. - '**/*.txt'
  17. - '**/*.html'
  18. - docs
  19. - docfx
  20. # Scan every Monday
  21. schedule:
  22. - cron: '20 14 * * 1'
  23. jobs:
  24. CodeQL-Build:
  25. if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule'
  26. runs-on: ubuntu-latest
  27. steps:
  28. - name: Checkout repository
  29. uses: actions/checkout@v4
  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@v3
  41. # Override language selection by uncommenting this and choosing your languages
  42. with:
  43. languages: csharp
  44. # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
  45. # If this step fails, then you should remove it and run the build manually (see below)
  46. - name: Autobuild
  47. uses: github/codeql-action/autobuild@v3
  48. # ℹ️ Command-line programs to run using the OS shell.
  49. # 📚 https://git.io/JvXDl
  50. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  51. # and modify them (or add more) to build your code if your project
  52. # uses a compiled language
  53. #- run: |
  54. # make bootstrap
  55. # make release
  56. - name: Perform CodeQL Analysis
  57. uses: github/codeql-action/analyze@v3