Skip to content

Commit

Permalink
Use Java 11 to build project in the codeql pipeline (#19999)
Browse files Browse the repository at this point in the history
Codeql uses Java 8 by default, which is too old for the project.

Related:

https://learn.microsoft.com/en-us/java/openjdk/reasons-to-move-to-java-11
https://github.com/actions/setup-java
  • Loading branch information
justinchuby authored Mar 21, 2024
1 parent 15219e2 commit 0335ea9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ jobs:
# Details on CodeQL's query packs refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality

# Setup Java to use a version that is not too old for the project
- if: ${{ matrix.language == 'java' }}
name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'microsoft'

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- if: ${{ matrix.language != 'cpp' }}
Expand Down

0 comments on commit 0335ea9

Please sign in to comment.