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
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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-01-11 17:32:46 +03:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
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-01-11 17:32:46 +03:00
|
|
|
uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
|
2022-12-16 11:57:01 +03:00
|
|
|
with:
|
|
|
|
languages: ${{ matrix.language }}
|
|
|
|
- name: Set up JDK
|
2023-01-11 17:32:46 +03:00
|
|
|
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3.9.0
|
2022-12-16 11:57:01 +03:00
|
|
|
with:
|
|
|
|
distribution: "temurin"
|
|
|
|
java-version: 11
|
|
|
|
- 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-01-11 17:32:46 +03:00
|
|
|
uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
|