Skip to content

Commit f9db94f

Browse files
committed
Updated build.yml to upload sarif files
1 parent 44354b1 commit f9db94f

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Build master
22

33
on:
4+
push:
5+
branches:
6+
- main
7+
48
pull_request:
9+
branches:
10+
- main
511
types: [ opened, synchronize, reopened ]
6-
paths-ignore:
7-
- ".github"
8-
- ".vscode"
912

1013
jobs:
1114
build:
@@ -20,7 +23,7 @@ jobs:
2023
uses: actions/setup-dotnet@v3
2124
with:
2225
global-json-file: global.json
23-
dotnet-version: 8.x
26+
dotnet-version: 9.x
2427

2528
- name: Build via Bash
2629
if: runner.os != 'Windows'
@@ -33,4 +36,28 @@ jobs:
3336
if: runner.os == 'Windows'
3437
run: ./build.cmd
3538
env:
36-
CI: true
39+
CI: true
40+
41+
analyze:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
- name: Setup necessary dotnet SDKs
46+
uses: actions/setup-dotnet@v3
47+
with:
48+
global-json-file: global.json
49+
dotnet-version: 9.x
50+
- name: Analyze
51+
run: |
52+
chmod +x ./build.sh
53+
./build.sh Analyze
54+
# This is important, you want to continue your Action even if you found problems.
55+
# As you always want the report to upload
56+
continue-on-error: true
57+
env:
58+
CI: true
59+
- name: Upload SARIF file
60+
uses: github/codeql-action/upload-sarif@v3
61+
with:
62+
# You can also specify the path to a folder for `sarif_file`
63+
sarif_file: analysisreports

0 commit comments

Comments
 (0)