codeql-analysis.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: "Code scanning - action"
  2. on:
  3. push:
  4. pull_request:
  5. schedule:
  6. - cron: '0 4 * * 0'
  7. jobs:
  8. CodeQL-Build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout repository
  12. uses: actions/checkout@v2
  13. with:
  14. # We must fetch at least the immediate parents so that if this is
  15. # a pull request then we can checkout the head.
  16. fetch-depth: 2
  17. # If this run was triggered by a pull request event, then checkout
  18. # the head of the pull request instead of the merge commit.
  19. - run: git checkout HEAD^2
  20. if: ${{ github.event_name == 'pull_request' }}
  21. # Initializes the CodeQL tools for scanning.
  22. - name: Initialize CodeQL
  23. uses: github/codeql-action/init@v1
  24. # Override language selection by uncommenting this and choosing your languages
  25. with:
  26. languages: csharp
  27. # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
  28. # If this step fails, then you should remove it and run the build manually (see below)
  29. # - name: Autobuild
  30. # uses: github/codeql-action/autobuild@v1
  31. - name: Setup .NET Core
  32. uses: actions/setup-dotnet@v1
  33. with:
  34. dotnet-version: 5.0.100-rc.1.20452.10
  35. - name: Install dependencies
  36. run: dotnet restore
  37. - name: Build
  38. run: dotnet build --configuration Release --no-restore
  39. # ℹ️ Command-line programs to run using the OS shell.
  40. # 📚 https://git.io/JvXDl
  41. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  42. # and modify them (or add more) to build your code if your project
  43. # uses a compiled language
  44. #- run: |
  45. # make bootstrap
  46. # make release
  47. - name: Perform CodeQL Analysis
  48. uses: github/codeql-action/analyze@v1