Skip to content

Commit 27f1330

Browse files
Create codeql.yml
1 parent a74e7d1 commit 27f1330

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
branches: [ master ]
19+
schedule:
20+
- cron: '37 15 * * 1'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
runs-on: ubuntu-latest
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
language: [ 'java', 'kotlin' ]
35+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
36+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v3
41+
42+
- uses: actions/setup-java@v4
43+
with:
44+
distribution: 'liberica'
45+
java-version: 21.0.4
46+
java-package: jdk+fx
47+
cache: 'gradle'
48+
49+
# Ensure Gradle uses this Java
50+
- name: Set JAVA_HOME
51+
run: echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
52+
# Initializes the CodeQL tools for scanning.
53+
- name: Initialize CodeQL
54+
uses: github/codeql-action/init@v4
55+
with:
56+
languages: ${{ matrix.language }}
57+
# If you wish to specify custom queries, you can do so here or in a config file.
58+
# By default, queries listed here will override any specified in a config file.
59+
# Prefix the list here with "+" to use these queries and those in the config file.
60+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
61+
62+
- name: Build with Gradle (skip tests)
63+
run: ./gradlew build -x test
64+
65+
# ℹ️ Command-line programs to run using the OS shell.
66+
# 📚 https://git.io/JvXDl
67+
68+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
69+
# and modify them (or add more) to build your code if your project
70+
# uses a compiled language
71+
72+
#- run: |
73+
# make bootstrap
74+
# make release
75+
76+
- name: Perform CodeQL Analysis
77+
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)