codeql-daily.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: CodeQL (daily)
  2. on:
  3. schedule:
  4. # daily at 1:30 UTC
  5. - cron: "30 1 * * *"
  6. workflow_dispatch:
  7. permissions:
  8. contents: read
  9. jobs:
  10. analyze:
  11. permissions:
  12. actions: read # for github/codeql-action/init to get workflow details
  13. security-events: write # for github/codeql-action/analyze to upload SARIF results
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  17. - name: Free disk space
  18. run: .github/scripts/gha-free-disk-space.sh
  19. - name: Set up Java 17
  20. uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
  21. with:
  22. distribution: temurin
  23. java-version: 17.0.6
  24. - name: Initialize CodeQL
  25. uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
  26. with:
  27. languages: java
  28. # using "latest" helps to keep up with the latest Kotlin support
  29. # see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
  30. tools: latest
  31. - uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3.1.0
  32. with:
  33. # skipping build cache is needed so that all modules will be analyzed
  34. arguments: assemble -x javadoc --no-build-cache --no-daemon
  35. - name: Perform CodeQL analysis
  36. uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
  37. workflow-notification:
  38. needs:
  39. - analyze
  40. if: always()
  41. uses: ./.github/workflows/reusable-workflow-notification.yml
  42. with:
  43. success: ${{ needs.analyze.result == 'success' }}