Skip to content

Commit 99c8de2

Browse files
Create codeql-analysis.yml
1 parent 75de98d commit 99c8de2

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- document
9+
- hotfix
10+
- release
11+
pull_request:
12+
# The branches below must be a subset of the branches above
13+
branches:
14+
- master
15+
- develop
16+
- document
17+
- hotfix
18+
- release
19+
schedule:
20+
- cron: '0 0 * * 2'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
# Override automatic language detection by changing the below list
31+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
32+
language: ['csharp']
33+
# Learn more...
34+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
with:
40+
# We must fetch at least the immediate parents so that if this is
41+
# a pull request then we can checkout the head.
42+
fetch-depth: 2
43+
44+
# If this run was triggered by a pull request event, then checkout
45+
# the head of the pull request instead of the merge commit.
46+
- run: git checkout HEAD^2
47+
if: ${{ github.event_name == 'pull_request' }}
48+
49+
# Initializes the CodeQL tools for scanning.
50+
- name: Initialize CodeQL
51+
uses: github/codeql-action/init@v1
52+
with:
53+
languages: ${{ matrix.language }}
54+
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v1
59+
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 https://git.io/JvXDl
62+
63+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64+
# and modify them (or add more) to build your code if your project
65+
# uses a compiled language
66+
67+
#- run: |
68+
# make bootstrap
69+
# make release
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)