codeql-daily.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  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@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
  21. with:
  22. distribution: temurin
  23. java-version-file: .java-version
  24. - name: Initialize CodeQL
  25. uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
  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. - name: Setup Gradle
  32. uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
  33. - name: Build
  34. # skipping build cache is needed so that all modules will be analyzed
  35. run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon
  36. - name: Perform CodeQL analysis
  37. uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
  38. workflow-notification:
  39. needs:
  40. - analyze
  41. if: always()
  42. uses: ./.github/workflows/reusable-workflow-notification.yml
  43. with:
  44. success: ${{ needs.analyze.result == 'success' }}