codeql-analysis.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: "CodeQL"
  2. permissions: read-all
  3. on:
  4. push:
  5. branches: [ main ]
  6. paths:
  7. - '**.js'
  8. - '**.go'
  9. - '!**_test.go'
  10. - '.github/workflows/codeql-analysis.yml'
  11. pull_request:
  12. # The branches below must be a subset of the branches above
  13. branches: [ main ]
  14. paths:
  15. - '**.js'
  16. - '**.go'
  17. - '!**_test.go'
  18. - '.github/workflows/codeql-analysis.yml'
  19. schedule:
  20. - cron: '45 22 * * 3'
  21. workflow_dispatch:
  22. jobs:
  23. analyze:
  24. name: Analyze (${{ matrix.language }})
  25. runs-on: ubuntu-latest
  26. permissions:
  27. actions: read
  28. contents: read
  29. security-events: write
  30. strategy:
  31. fail-fast: false
  32. matrix:
  33. language: [ 'go', 'javascript' ]
  34. steps:
  35. - name: Checkout repository
  36. uses: actions/checkout@v6
  37. - uses: actions/setup-go@v6
  38. if: matrix.language == 'go'
  39. with:
  40. go-version: stable
  41. - name: Initialize CodeQL
  42. uses: github/codeql-action/init@v4
  43. with:
  44. languages: ${{ matrix.language }}
  45. - name: Autobuild
  46. uses: github/codeql-action/autobuild@v4
  47. - name: Perform CodeQL Analysis
  48. uses: github/codeql-action/analyze@v4
  49. with:
  50. category: "/language:${{ matrix.language }}"