-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (57 loc) · 2.13 KB
/
code_analysis.yml
File metadata and controls
68 lines (57 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow action performs code analysis over the repo to ensure safety from build failures
# as well as security faults
# Refer to https://github.com/github/codeql-action
name: Code Analysis
on:
# push:
# branches: [ develop ]
# pull_request:
# branches: [ develop ]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 0 * * 0'
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
steps:
# Checkout Repository
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: java
# Setup Java 17 (Refer to https://github.com/actions/setup-java)
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
# Validate Gradle Wrapper
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1.0.4
# Build Java Project with Gradle
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.2.1
with:
arguments: build
cache-disabled: true
# Perform CodeQL Analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2