Install Maven 3.5.4 in GitHub Actions workflow #165
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' ] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: [ 'master' ] | |
| schedule: | |
| - cron: '52 12 * * 1' | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'java' ] | |
| version: [8,11] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - if: ${{ matrix.version == '8' }} | |
| name: Set up JDK 8 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-package: jdk+fx | |
| java-version: '1.8' | |
| distribution: 'adopt' | |
| - if: ${{ matrix.version == '8' }} | |
| name: Add openjfx FOR JDK8 | |
| run: sudo apt-get install openjfx | |
| - if: ${{ matrix.version == '11' }} | |
| name: Set up JDK 11 ${{ matrix.version }} | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-package: jdk | |
| java-version: '11' | |
| distribution: 'adopt' | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v2 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - if: ${{ matrix.version == '8' }} | |
| name: Build FOR JDK8 | |
| run: mvn assembly:assembly -f pom.xml | |
| - if: ${{ matrix.version == '11' }} | |
| name: Build FOR JDK11 | |
| run: mvn assembly:assembly -f pom-jdk11.xml | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v2 | |
| with: | |
| category: "/language:${{matrix.language}}" |