Skip to content

Commit d34aa0f

Browse files
committed
update CodeQL pipeline to use latest actions, plus fixed set-output warnings
1 parent d183397 commit d34aa0f

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

.github/workflows/build-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
run: |
7777
readarray -d '' coveragePathArray < <(find . -name "coverage.cobertura.xml" -print0)
7878
coveragePaths=$(printf ",%s" "${coveragePathArray[@]}")
79-
echo "::set-output name=COVERAGE_REPORT_PATHS::$coveragePaths"
79+
echo "COVERAGE_REPORT_PATHS=$coveragePaths" >> $GITHUB_OUTPUT
8080
8181
- name: Publish Code Coverage Results
8282
uses: codacy/codacy-coverage-reporter-action@v1

.github/workflows/codeql-analysis.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ on:
1515
push:
1616
branches: [ "master" ]
1717
pull_request:
18-
# The branches below must be a subset of the branches above
1918
branches: [ "master" ]
2019
schedule:
21-
- cron: '22 15 * * 6'
20+
- cron: '16 4 * * 0'
2221

2322
jobs:
2423
analyze:
2524
name: Analyze
26-
runs-on: ubuntu-latest
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners
29+
# Consider using larger runners for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
2732
permissions:
2833
actions: read
2934
contents: read
@@ -33,7 +38,9 @@ jobs:
3338
fail-fast: false
3439
matrix:
3540
language: [ 'csharp' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
41+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
42+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
43+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
3744
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3845

3946
steps:
@@ -42,21 +49,22 @@ jobs:
4249

4350
# Initializes the CodeQL tools for scanning.
4451
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
52+
uses: github/codeql-action/init@v3
4653
with:
4754
languages: ${{ matrix.language }}
4855
# If you wish to specify custom queries, you can do so here or in a config file.
4956
# By default, queries listed here will override any specified in a config file.
5057
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# 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
58+
59+
# 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
5360
# queries: security-extended,security-and-quality
5461

55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
62+
63+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
5764
# If this step fails, then you should remove it and run the build manually (see below)
5865
# - name: Autobuild
59-
# uses: github/codeql-action/autobuild@v2
66+
# uses: github/codeql-action/autobuild@v3
67+
6068
- name: Setup .NET Core
6169
uses: actions/setup-dotnet@v4
6270
with:
@@ -73,14 +81,14 @@ jobs:
7381
# ℹ️ Command-line programs to run using the OS shell.
7482
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
7583

76-
# If the Autobuild fails above, remove it and uncomment the following three lines.
84+
# If the Autobuild fails above, remove it and uncomment the following three lines.
7785
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
7886

7987
# - run: |
80-
# echo "Run, Build Application using script"
81-
# ./location_of_script_within_repo/buildscript.sh
88+
# echo "Run, Build Application using script"
89+
# ./location_of_script_within_repo/buildscript.sh
8290

8391
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@v2
92+
uses: github/codeql-action/analyze@v3
8593
with:
8694
category: "/language:${{matrix.language}}"

.github/workflows/publish-pr-coverage-results.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
readarray -d '' coveragePathArray < <(find . -name "coverage.cobertura.xml" -print0)
5151
coveragePaths=$(printf ",%s" "${coveragePathArray[@]}")
52-
echo "::set-output name=COVERAGE_REPORT_PATHS::$coveragePaths"
52+
echo "COVERAGE_REPORT_PATHS=$coveragePaths" >> $GITHUB_OUTPUT
5353
5454
- name: Publish Code Coverage Results
5555
uses: codacy/codacy-coverage-reporter-action@v1

0 commit comments

Comments
 (0)