codeql.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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-54
  24. language:
  25. - cpp
  26. - python
  27. steps:
  28. - name: Checkout repository
  29. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  30. with:
  31. ref: ${{ matrix.branch }}
  32. - name: Ensure git safe dir
  33. run: |
  34. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  35. make ensure-rebar3
  36. - name: Initialize CodeQL
  37. uses: github/codeql-action/init@7e187e1c529d80bac7b87a16e7a792427f65cf02 # v2.15.5
  38. with:
  39. languages: ${{ matrix.language }}
  40. - name: Build
  41. if: matrix.language == 'cpp'
  42. env:
  43. PROFILE: emqx-enterprise
  44. run: |
  45. make emqx-enterprise-compile
  46. - name: Fetch deps
  47. if: matrix.language == 'python'
  48. env:
  49. PROFILE: emqx-enterprise
  50. run: |
  51. make deps-emqx-enterprise
  52. - name: Perform CodeQL Analysis
  53. uses: github/codeql-action/analyze@7e187e1c529d80bac7b87a16e7a792427f65cf02 # v2.15.5
  54. with:
  55. category: "/language:${{matrix.language}}"