Skip to content

Commit aa2d4b0

Browse files
updated workflow v4
1 parent d372d98 commit aa2d4b0

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

.github/workflows/codeql.yml

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
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+
114
name: "CodeQL"
215

316
on:
417
push:
518
branches: [ "main" ]
619
pull_request:
7-
branches: [ "main" ]
20+
# The branches below must be a subset of the branches above
21+
branches: [ "main" ]
822

923
jobs:
1024
analyze:
1125
name: Analyze
12-
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
13-
timeout-minutes: ${{ matrix.language == 'swift' && 120 || 360 }}
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 }}
1433
permissions:
1534
actions: read
1635
contents: read
@@ -20,48 +39,44 @@ jobs:
2039
fail-fast: false
2140
matrix:
2241
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
2346
dot-version: ['3.1.x']
2447

2548
steps:
2649
- name: Checkout repository
2750
uses: actions/checkout@v3
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: Upgrade OpenSSL and libssl
35-
run: |
36-
sudo apt-get install --only-upgrade openssl libssl-dev
37-
sudo apt-get install -y libssl1.1 libssl3
38-
39-
- name: Set environment variable for SSL path
40-
run: |
41-
echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
42-
sudo ldconfig
43-
44-
- name: Setup dotnet ${{ matrix.dot-version }}
51+
52+
# Installing DotNet version
53+
- name: Setup dotnet ${{ matrix.dotnet-version }}
4554
uses: actions/setup-dotnet@v3
4655
with:
4756
dotnet-version: ${{ matrix.dot-version }}
48-
49-
- name: Set Globalization Invariant Mode (optional)
50-
run: echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV
51-
57+
58+
# Display dotnet version for confirmation
5259
- name: Display dotnet version
5360
run: dotnet --version
54-
61+
62+
# Initializes the CodeQL tools for scanning.
5563
- name: Initialize CodeQL
5664
uses: github/codeql-action/init@v2
5765
with:
5866
languages: ${{ matrix.language }}
67+
# You can customize the queries here or in a config file.
5968

69+
# Manually build the C# project using dotnet build
6070
- name: Build the C# project
6171
if: matrix.language == 'csharp'
6272
run: |
6373
dotnet restore
6474
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
6580

6681
- name: Perform CodeQL Analysis
6782
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)