codeql.yaml 1.5 KB

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