Skip to content

Commit 52908d7

Browse files
Update Code-Scanning.yml to use latest windows-drivers pack (#1277)
* Update Code-Scanning.yml to use latest windows-drivers pack * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml * Update Code-Scanning.yml: reduce duplacate code
1 parent ee6a889 commit 52908d7

File tree

1 file changed

+14
-45
lines changed

1 file changed

+14
-45
lines changed

.github/workflows/Code-Scanning.yml

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,8 @@ on:
2424
workflow_dispatch:
2525

2626
jobs:
27-
analyze-push:
28-
name: Analysis-Push
29-
if: github.event_name == 'push'
30-
runs-on: windows-latest
31-
permissions:
32-
actions: read
33-
contents: read
34-
security-events: write
35-
36-
strategy:
37-
fail-fast: false
38-
matrix:
39-
language: [ 'cpp' ]
40-
41-
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@v4
44-
with:
45-
submodules: 'recursive'
46-
- name: Install Nuget Packages
47-
run: nuget restore .\packages.config -PackagesDirectory .\packages\
48-
49-
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@v3
51-
with:
52-
languages: ${{ matrix.language }}
53-
config-file: microsoft/Windows-Driver-Developer-Supplemental-Tools/config/codeql-config.yml@development
54-
packs: +microsoft/[email protected]
55-
- name: Retrieve and build all available solutions
56-
run: .\Build-AllSamples.ps1 -Verbose -ThrottleLimit 1
57-
env:
58-
WDS_Configuration: Debug
59-
WDS_Platform: x64
60-
WDS_WipeOutputs: ${{ true }}
61-
62-
- name: Perform CodeQL analysis
63-
uses: github/codeql-action/analyze@v3
64-
with:
65-
category: "/language:${{matrix.language}}"
66-
analyze-pr:
67-
name: Analysis-PR
68-
if: github.event_name == 'pull_request'
27+
analyze:
28+
name: Analysis
6929
runs-on: windows-latest
7030
permissions:
7131
actions: read
@@ -97,12 +57,21 @@ jobs:
9757
languages: ${{ matrix.language }}
9858
build-mode: ${{ matrix.build-mode }}
9959
config-file: microsoft/Windows-Driver-Developer-Supplemental-Tools/config/codeql-config.yml@development
100-
packs: +microsoft/[email protected]
101-
- if: matrix.build-mode == 'manual'
60+
- if: github.event_name == 'pull_request'
10261
run: |
10362
$changedFiles = "${{ steps.get-changed-files.outputs.all_changed_files }}".Split(',')
10463
.\.github\scripts\Build-ChangedSamples.ps1 -ChangedFiles $changedFiles -Verbose
64+
env:
65+
WDS_Configuration: Debug
66+
WDS_Platform: x64
67+
WDS_WipeOutputs: ${{ true }}
68+
- if: github.event_name == 'push'
69+
run: .\Build-AllSamples.ps1 -Verbose -ThrottleLimit 1
70+
env:
71+
WDS_Configuration: Debug
72+
WDS_Platform: x64
73+
WDS_WipeOutputs: ${{ true }}
10574
- name: Perform CodeQL analysis
10675
uses: github/codeql-action/analyze@v3
10776
with:
108-
category: "/language:${{matrix.language}}"
77+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)