Skip to content

Commit 10463d4

Browse files
workflow update v5
1 parent aa2d4b0 commit 10463d4

File tree

1 file changed

+16
-41
lines changed

1 file changed

+16
-41
lines changed

.github/workflows/codeql.yml

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,16 @@
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-
# You may need to adjust this file for your specific repository or build process.
13-
141
name: "CodeQL"
152

163
on:
174
push:
185
branches: [ "main" ]
196
pull_request:
20-
# The branches below must be a subset of the branches above
21-
branches: [ "main" ]
7+
branches: [ "main" ]
228

239
jobs:
2410
analyze:
2511
name: Analyze
26-
# Runner size impacts CodeQL analysis time. To learn more, please see:
27-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28-
# - https://gh.io/supported-runners-and-hardware-resources
29-
# - https://gh.io/using-larger-runners
30-
# Consider using larger runners for possible analysis time improvements.
31-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
12+
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
13+
timeout-minutes: ${{ matrix.language == 'swift' && 120 || 360 }}
3314
permissions:
3415
actions: read
3516
contents: read
@@ -38,45 +19,39 @@ jobs:
3819
strategy:
3920
fail-fast: false
4021
matrix:
41-
language: [ 'csharp', 'javascript-typescript' ]
42-
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
43-
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
44-
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
45-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
22+
language: [ 'csharp', ]
4623
dot-version: ['3.1.x']
4724

4825
steps:
4926
- name: Checkout repository
5027
uses: actions/checkout@v3
51-
52-
# Installing DotNet version
53-
- name: Setup dotnet ${{ matrix.dotnet-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y libicu-dev libssl-dev ca-certificates openssl
33+
34+
- name: Set System.Globalization.Invariant to true
35+
run: echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV
36+
37+
- name: Setup dotnet ${{ matrix.dot-version }}
5438
uses: actions/setup-dotnet@v3
5539
with:
5640
dotnet-version: ${{ matrix.dot-version }}
57-
58-
# Display dotnet version for confirmation
41+
5942
- name: Display dotnet version
6043
run: dotnet --version
61-
62-
# Initializes the CodeQL tools for scanning.
44+
6345
- name: Initialize CodeQL
6446
uses: github/codeql-action/init@v2
6547
with:
6648
languages: ${{ matrix.language }}
67-
# You can customize the queries here or in a config file.
6849

69-
# Manually build the C# project using dotnet build
7050
- name: Build the C# project
7151
if: matrix.language == 'csharp'
7252
run: |
7353
dotnet restore
7454
dotnet build --configuration Release
75-
76-
# If autobuild fails, manually trigger the build here for other languages.
77-
# - run: |
78-
# echo "Run, Build Application using script"
79-
# ./location_of_script_within_repo/buildscript.sh
8055
8156
- name: Perform CodeQL Analysis
8257
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)