Skip to content

Commit d623586

Browse files
authored
Merge pull request #578 from pipeline-foundation/feature/codeql
Add continuous code security and quality analysis
2 parents 6b26052 + ae54ea6 commit d623586

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CodeQL Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 8 * * *'
8+
9+
jobs:
10+
analyze:
11+
name: CodeQL Analysis
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
id: checkout_repo
16+
uses: actions/checkout@v2
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 5.0.x
22+
23+
- name: Initialize CodeQL
24+
id: init_codeql
25+
uses: github/codeql-action/init@v1
26+
with:
27+
queries: security-and-quality
28+
29+
- name: Build projects
30+
id: build_projects
31+
shell: pwsh
32+
run: |
33+
$projectsArray = @(
34+
'.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj',
35+
'.\src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj',
36+
'.\src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj'
37+
)
38+
39+
$projectsArray | ForEach-Object {
40+
dotnet build $PSItem -c Release
41+
}
42+
43+
- name: Perform CodeQL Analysis
44+
id: analyze_codeql
45+
uses: github/codeql-action/analyze@v1
46+
47+
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

0 commit comments

Comments
 (0)