|
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 | | -# |
12 | 1 | name: "CodeQL" |
13 | 2 |
|
14 | 3 | on: |
15 | 4 | push: |
16 | 5 | branches: [ main ] |
17 | 6 | pull_request: |
18 | | - # The branches below must be a subset of the branches above |
19 | 7 | branches: [ main ] |
20 | 8 | schedule: |
21 | 9 | - cron: '27 10 * * 1' |
22 | 10 |
|
23 | 11 | jobs: |
24 | 12 | analyze: |
25 | 13 | name: Analyze |
26 | | - env: |
27 | | - OFFICIAL_BUILD: 'True' |
28 | 14 | runs-on: ubuntu-latest |
29 | 15 | permissions: |
30 | 16 | actions: read |
31 | 17 | contents: read |
32 | 18 | security-events: write |
33 | 19 |
|
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 | | - |
42 | 20 | steps: |
43 | 21 | - uses: actions/checkout@v3 |
44 | 22 | with: |
45 | 23 | fetch-depth: 0 |
46 | 24 |
|
47 | | - # Initializes the CodeQL tools for scanning. |
48 | 25 | - 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] |
64 | 27 | 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' |
79 | 29 |
|
80 | | - #- run: | |
81 | | - # make bootstrap |
82 | | - # make release |
| 30 | + - name: Autobuild |
| 31 | + uses: github/codeql-action/[email protected] |
83 | 32 |
|
84 | 33 | - name: Perform CodeQL Analysis |
85 | | - uses: github/codeql-action/analyze@v2 |
| 34 | + uses: github/codeql-action/analyze@v2.1.21 |
0 commit comments