Skip to content

Commit 7c5d7fe

Browse files
authored
ci: fix codeql workflow (#229)
1 parent 83acbd4 commit 7c5d7fe

File tree

1 file changed

+5
-56
lines changed

1 file changed

+5
-56
lines changed
Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,34 @@
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-
#
121
name: "CodeQL"
132

143
on:
154
push:
165
branches: [ main ]
176
pull_request:
18-
# The branches below must be a subset of the branches above
197
branches: [ main ]
208
schedule:
219
- cron: '27 10 * * 1'
2210

2311
jobs:
2412
analyze:
2513
name: Analyze
26-
env:
27-
OFFICIAL_BUILD: 'True'
2814
runs-on: ubuntu-latest
2915
permissions:
3016
actions: read
3117
contents: read
3218
security-events: write
3319

34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
language: [ 'csharp' ]
38-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
39-
# Learn more:
40-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
41-
4220
steps:
4321
- uses: actions/checkout@v3
4422
with:
4523
fetch-depth: 0
4624

47-
# Initializes the CodeQL tools for scanning.
4825
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@v2
50-
with:
51-
languages: ${{ matrix.language }}
52-
# If you wish to specify custom queries, you can do so here or in a config file.
53-
# By default, queries listed here will override any specified in a config file.
54-
# Prefix the list here with "+" to use these queries and those in the config file.
55-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
56-
57-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
58-
# If this step fails, then you should remove it and run the build manually (see below)
59-
# - name: Autobuild
60-
# uses: github/codeql-action/autobuild@v1
61-
62-
- name: Setup .NET Core
63-
uses: actions/setup-dotnet@v2
26+
uses: github/codeql-action/[email protected]
6427
with:
65-
dotnet-version: 3.1.x
66-
67-
- name: dotnet restore
68-
run: dotnet restore
69-
70-
- name: Build and publish
71-
run: dotnet publish -o dist --no-self-contained -c Release ./src/Microsoft.ComponentDetection
72-
73-
# ℹ️ Command-line programs to run using the OS shell.
74-
# 📚 https://git.io/JvXDl
75-
76-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
77-
# and modify them (or add more) to build your code if your project
78-
# uses a compiled language
28+
languages: 'csharp'
7929

80-
#- run: |
81-
# make bootstrap
82-
# make release
30+
- name: Autobuild
31+
uses: github/codeql-action/[email protected]
8332

8433
- name: Perform CodeQL Analysis
85-
uses: github/codeql-action/analyze@v2
34+
uses: github/codeql-action/analyze@v2.1.21

0 commit comments

Comments
 (0)