blob: 4a9279eaa72c70006e45be32222acc7c8d7cc612 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: codeql-analysis
on:
workflow_call:
inputs:
java-version:
description: The Java compiler version
default: 17
type: string
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'kotlin', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
language:
description:
default: java
type: string
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0
with:
languages: ${{ inputs.language }}
- name: Setup JDK
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # 4.5.0
with:
distribution: zulu
java-version: ${{ inputs.java-version }}
cache: maven
- name: Build with Maven
shell: bash
run: |
./mvnw \
--show-version --batch-mode --errors --no-transfer-progress \
-DskipTests \
clean verify
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0