codeql.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: "CodeQL"
  2. on:
  3. schedule:
  4. - cron: '33 14 * * 4'
  5. workflow_dispatch:
  6. inputs:
  7. ref:
  8. required: false
  9. permissions:
  10. contents: read
  11. jobs:
  12. analyze:
  13. name: Analyze
  14. runs-on: ubuntu-22.04
  15. timeout-minutes: 360
  16. permissions:
  17. actions: read
  18. security-events: write
  19. container:
  20. image: ghcr.io/emqx/emqx-builder/5.3-2:1.15.7-26.2.1-2-ubuntu22.04
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. language: [ 'cpp', 'python' ]
  25. steps:
  26. - name: Checkout repository
  27. uses: actions/checkout@v3
  28. with:
  29. ref: ${{ github.event.inputs.ref }}
  30. - name: Ensure git safe dir
  31. run: |
  32. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  33. make ensure-rebar3
  34. - name: Initialize CodeQL
  35. uses: github/codeql-action/init@v2
  36. with:
  37. languages: ${{ matrix.language }}
  38. - name: Build
  39. if: matrix.language == 'cpp'
  40. env:
  41. PROFILE: emqx-enterprise
  42. run: |
  43. make emqx-enterprise-compile
  44. - name: Fetch deps
  45. if: matrix.language == 'python'
  46. env:
  47. PROFILE: emqx-enterprise
  48. run: |
  49. make deps-emqx-enterprise
  50. - name: Perform CodeQL Analysis
  51. uses: github/codeql-action/analyze@v2
  52. with:
  53. category: "/language:${{matrix.language}}"