Arosha #64
This file contains hidden or 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", "Dev" ] | |
| pull_request: | |
| branches: [ "main", "Dev" ] | |
| schedule: | |
| - cron: "33 19 * * 4" | |
| jobs: | |
| analyze: | |
| name: Analyze (Java 21) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| actions: read | |
| contents: read | |
| packages: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: maven | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: java-kotlin | |
| build-mode: manual | |
| queries: security-extended,security-and-quality | |
| # Maven (Spring Initializr usually uses Maven) | |
| - name: Build with Maven | |
| if: hashFiles('pom.xml') != '' | |
| run: | | |
| chmod +x mvnw || true | |
| ./mvnw -B -DskipTests clean package || mvn -B -DskipTests clean package | |
| # Gradle (only runs if Gradle files exist) | |
| - name: Build with Gradle | |
| if: hashFiles('build.gradle', 'build.gradle.kts') != '' | |
| run: | | |
| chmod +x gradlew || true | |
| ./gradlew build -x test | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: "/language:java-kotlin" |