Skip to content

Commit d133687

Browse files
committed
Update workflows
1 parent f28591c commit d133687

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed
Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ "master" ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ "master" ]
2020
schedule:
21-
- cron: '18 12 * * 2'
21+
- cron: '17 4 * * 5'
2222

2323
jobs:
2424
analyze:
2525
name: Analyze
26-
runs-on: ubuntu-latest
26+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2727
permissions:
2828
actions: read
2929
contents: read
@@ -33,39 +33,44 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
language: [ 'csharp' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# 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
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Use only 'java' to analyze code written in Java, Kotlin or both
38+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3940

4041
steps:
4142
- name: Checkout repository
42-
uses: actions/checkout@v2
43+
uses: actions/checkout@v3
4344

4445
# Initializes the CodeQL tools for scanning.
4546
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
47+
uses: github/codeql-action/init@v2
4748
with:
4849
languages: ${{ matrix.language }}
4950
# If you wish to specify custom queries, you can do so here or in a config file.
5051
# By default, queries listed here will override any specified in a config file.
5152
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5353

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55+
# queries: security-extended,security-and-quality
56+
57+
58+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5559
# If this step fails, then you should remove it and run the build manually (see below)
5660
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
61+
uses: github/codeql-action/autobuild@v2
5862

5963
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
64+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6165

62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
66+
# If the Autobuild fails above, remove it and uncomment the following three lines.
67+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6568

66-
#- run: |
67-
# make bootstrap
68-
# make release
69+
# - run: |
70+
# echo "Run, Build Application using script"
71+
# ./location_of_script_within_repo/buildscript.sh
6972

7073
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
74+
uses: github/codeql-action/analyze@v2
75+
with:
76+
category: "/language:${{matrix.language}}"

.github/workflows/dotnet.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
16-
- name: Setup .NET Core 3.1
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: 3.1.x
20-
- name: Setup .NET Core 6.0
21-
uses: actions/setup-dotnet@v1
15+
- uses: actions/checkout@v3
16+
- name: Setup .NET 10.0
17+
uses: actions/setup-dotnet@v3
2218
with:
23-
dotnet-version: 6.0.x
19+
dotnet-version: 10.0.x
2420
- name: Restore dependencies
2521
run: dotnet restore
2622
- name: Build
2723
run: dotnet build --configuration Release --no-restore
2824
- name: Test
29-
run: dotnet test --no-build --configuration Release --verbosity normal
25+
run: dotnet test --no-build --configuration Release --verbosity normal

0 commit comments

Comments
 (0)