2022-12-14 16:49:56 +03:00
|
|
|
# synced from @nextcloud/android-config
|
2022-06-13 13:03:55 +03:00
|
|
|
name: "CodeQL"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-07-21 14:57:11 +03:00
|
|
|
branches: [ "master", "main", "stable-*" ]
|
2022-06-13 13:03:55 +03:00
|
|
|
pull_request:
|
2022-07-21 14:57:11 +03:00
|
|
|
branches: [ "master", "main" ]
|
2022-06-13 13:03:55 +03:00
|
|
|
schedule:
|
|
|
|
- cron: '24 18 * * 3'
|
|
|
|
|
2022-07-01 10:06:35 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-06-13 13:03:55 +03:00
|
|
|
jobs:
|
|
|
|
analyze:
|
|
|
|
name: Analyze
|
2023-06-12 10:53:46 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2022-06-13 13:03:55 +03:00
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-12-16 11:57:01 +03:00
|
|
|
language: [ 'java' ]
|
2022-06-13 13:03:55 +03:00
|
|
|
steps:
|
2022-12-16 11:57:01 +03:00
|
|
|
- name: Checkout repository
|
2023-10-18 11:09:01 +03:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-12-16 11:57:01 +03:00
|
|
|
- name: Set Swap Space
|
|
|
|
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
|
|
|
|
with:
|
2022-12-14 16:49:56 +03:00
|
|
|
swap-size-gb: 10
|
2022-12-16 11:57:01 +03:00
|
|
|
- name: Initialize CodeQL
|
2023-12-14 03:04:48 +03:00
|
|
|
uses: github/codeql-action/init@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11
|
2022-12-16 11:57:01 +03:00
|
|
|
with:
|
|
|
|
languages: ${{ matrix.language }}
|
2023-06-07 05:50:56 +03:00
|
|
|
- name: Set up JDK 17
|
2023-11-30 09:36:06 +03:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-12-16 11:57:01 +03:00
|
|
|
with:
|
|
|
|
distribution: "temurin"
|
2023-04-26 05:32:09 +03:00
|
|
|
java-version: 17
|
2022-12-16 11:57:01 +03:00
|
|
|
- name: Assemble
|
|
|
|
run: |
|
|
|
|
mkdir -p "$HOME/.gradle"
|
|
|
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
|
|
|
|
./gradlew assembleDebug
|
|
|
|
- name: Perform CodeQL Analysis
|
2023-12-14 03:04:48 +03:00
|
|
|
uses: github/codeql-action/analyze@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11
|