codeql-daily.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: CodeQL (daily)
  2. on:
  3. schedule:
  4. # daily at 1:30 UTC
  5. - cron: "30 1 * * *"
  6. workflow_dispatch:
  7. jobs:
  8. analyze:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - name: Free disk space
  13. run: .github/scripts/gha-free-disk-space.sh
  14. - name: Set up Java 17
  15. uses: actions/setup-java@v3
  16. with:
  17. distribution: temurin
  18. java-version: 17.0.6
  19. - name: Initialize CodeQL
  20. uses: github/codeql-action/init@v2
  21. with:
  22. languages: java
  23. # using "latest" helps to keep up with the latest Kotlin support
  24. # see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
  25. tools: latest
  26. - name: Increase gradle daemon heap size
  27. run: |
  28. sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
  29. - uses: gradle/gradle-build-action@v2
  30. with:
  31. # skipping build cache is needed so that all modules will be analyzed
  32. arguments: assemble -x javadoc --no-build-cache --no-daemon
  33. - name: Perform CodeQL analysis
  34. uses: github/codeql-action/analyze@v2
  35. workflow-notification:
  36. needs:
  37. - analyze
  38. if: always()
  39. uses: ./.github/workflows/reusable-workflow-notification.yml
  40. with:
  41. success: ${{ needs.analyze.result == 'success' }}