Repository navigation
Merge pull request #38 from SkyBlade1978/master-1.10.2 #5
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: | |
| - master-1.10.2 | |
| - 'feature/**' | |
| pull_request: | |
| branches: | |
| - master-1.10.2 | |
| schedule: | |
| - cron: '47 7 * * 4' | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| jobs: | |
| analyze: | |
| name: Analyze Java | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Check out pinned OreSpawn | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| repository: MinecraftModDevelopmentMods/OreSpawn | |
| ref: 5a50df1158e948c8db55814e819090b34c12d765 | |
| path: .ci-dependencies/OreSpawn | |
| - name: Install Java 8 toolchain | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '8.0.502+7' | |
| - name: Install Java 17 for Gradle | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: microsoft | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 | |
| - name: Build pinned OreSpawn development jar | |
| id: orespawn | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| dependency="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" | |
| chmod +x "$dependency/gradlew" | |
| ( | |
| cd "$dependency" | |
| ./gradlew deobfJar --no-daemon --stacktrace | |
| ) | |
| jar="$dependency/build/libs-dev/OreSpawn-4.0.8.110021-deobf.jar" | |
| test -f "$jar" | |
| echo "jar=$jar" >> "$GITHUB_OUTPUT" | |
| - name: Stage exact RebornCore compile API | |
| id: reborncore | |
| run: | | |
| mirror="$RUNNER_TEMP/reborncore-mirror" | |
| bash gradle/stage-reborncore-release.sh "$mirror" | |
| echo "repository=$mirror" >> "$GITHUB_OUTPUT" | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 | |
| with: | |
| languages: java-kotlin | |
| - name: Compile production code | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \ | |
| -PrebornCoreVerificationRepository=${{ steps.reborncore.outputs.repository }} \ | |
| -PoreSpawnDeobfJar=${{ steps.orespawn.outputs.jar }} | |
| - name: Analyze | |
| uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 |