CodeQL #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '26 19 * * 6' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
permissions: | |
security-events: write | |
actions: read | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check Directory | |
run: | | |
if [ -d "android" ]; then | |
echo "Directory exists" | |
exit 0 | |
else | |
echo "Directory does not exist" | |
exit 1 | |
fi | |
continue-on-error: true | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: java-kotlin | |
# Install Java 17 and set JAVA_HOME | |
- name: Set up Java 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "adopt" | |
java-version: "17" | |
architecture: "x64" | |
# Manually build your code here, but only if the directory exists | |
- name: Build | |
run: | | |
cd android | |
./gradlew assemble | |
ls -l app/build/outputs/apk/release/*.apk | |
if: always() | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:java-kotlin" |