diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 081a9049..26444965 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,6 +31,14 @@ jobs: fetch-depth: 0 path: ./ + # Pin the JDK Autobuild uses instead of the runner image default (JDK 17 on ubuntu-latest). + # Matches pr.yml. SK-3332. + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9bec79c5..19fa4beb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -48,6 +48,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + # Pin the JDK Autobuild uses instead of the runner image default (JDK 17 on ubuntu-latest). + # Matches pr.yml. SK-3332. + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2