codeql.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # synced from @nextcloud/android-config
  2. # SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
  3. # SPDX-FileCopyrightText: 2023-2024 Andy Scherzinger <info@andy-scherzinger.de>
  4. # SPDX-FileCopyrightText: 2022 Tobias Kaminsky <tobias@kaminsky.me>
  5. # SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
  6. # SPDX-License-Identifier: GPL-3.0-or-later
  7. name: "CodeQL"
  8. on:
  9. push:
  10. branches: [ "master", "main", "stable-*" ]
  11. pull_request:
  12. branches: [ "master", "main" ]
  13. schedule:
  14. - cron: '24 18 * * 3'
  15. permissions:
  16. contents: read
  17. jobs:
  18. analyze:
  19. name: Analyze
  20. runs-on: ubuntu-24.04
  21. permissions:
  22. actions: read
  23. contents: read
  24. security-events: write
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. language: [ 'java' ]
  29. steps:
  30. - name: Checkout repository
  31. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  32. - name: Set Swap Space
  33. uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
  34. with:
  35. swap-size-gb: 10
  36. - name: Initialize CodeQL
  37. uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
  38. with:
  39. languages: ${{ matrix.language }}
  40. - name: Set up JDK 17
  41. uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
  42. with:
  43. distribution: "temurin"
  44. java-version: 17
  45. - name: Assemble
  46. run: |
  47. mkdir -p "$HOME/.gradle"
  48. echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
  49. ./gradlew assembleDebug
  50. - name: Perform CodeQL Analysis
  51. uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5