Skip to content

Commit

Permalink
[ISSUE #355] Setup Github workflows for CodeQL scans (#356)
Browse files Browse the repository at this point in the history
* Setup CodeQL scans

* disable autorun

* add a step for setting up JDK

* add codeql

* fix step Build

* fix strategy

* add events: schedule & workflow_dispatch
  • Loading branch information
SteveYurongSu authored May 18, 2021
1 parent edb66bd commit d599eea
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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"

on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'
pull_request:
branches:
- develop
paths-ignore:
- 'docs/**'
schedule:
- cron: '30 5 * * *'
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language:
- 'java'
java:
- 8

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
languages: ${{ matrix.language }}

- name: Build
run: ./gradlew clean build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit d599eea

Please sign in to comment.