Skip to content

Commit bd0f4a7

Browse files
authored
Merge pull request #890 from GNS3/update-ga-workflows
Update GitHub Action workflows
2 parents ecae0f7 + 7625170 commit bd0f4a7

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

.github/workflows/add-new-issues-to-project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Add issue to project
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/add-to-project@v0.4.0
13+
- uses: actions/add-to-project@v1.0.1
1414
with:
1515
project-url: https://github.com/orgs/GNS3/projects/3
1616
github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}

.github/workflows/codeql.yml

+45-28
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,79 @@ 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: '33 16 * * 0'
20+
- cron: '26 8 * * 4'
2221

2322
jobs:
2423
analyze:
25-
name: Analyze
26-
runs-on: ubuntu-latest
24+
name: Analyze (${{ matrix.language }})
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 (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources 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:
33+
# required for all workflows
34+
security-events: write
35+
36+
# required to fetch internal or private CodeQL packs
37+
packages: read
38+
39+
# only required for workflows in private repositories
2840
actions: read
2941
contents: read
30-
security-events: write
3142

3243
strategy:
3344
fail-fast: false
3445
matrix:
35-
language: [ 'python' ]
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
40-
46+
include:
47+
- language: python
48+
build-mode: none
49+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
50+
# Use `c-cpp` to analyze code written in C, C++ or both
51+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
52+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
53+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
54+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
55+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
56+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
4157
steps:
4258
- name: Checkout repository
43-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
4460

4561
# Initializes the CodeQL tools for scanning.
4662
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
63+
uses: github/codeql-action/init@v3
4864
with:
4965
languages: ${{ matrix.language }}
66+
build-mode: ${{ matrix.build-mode }}
5067
# If you wish to specify custom queries, you can do so here or in a config file.
5168
# By default, queries listed here will override any specified in a config file.
5269
# Prefix the list here with "+" to use these queries and those in the config file.
5370

54-
# 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
71+
# 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
5572
# queries: security-extended,security-and-quality
5673

57-
58-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59-
# If this step fails, then you should remove it and run the build manually (see below)
60-
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
62-
74+
# If the analyze step fails for one of the languages you are analyzing with
75+
# "We were unable to automatically build your code", modify the matrix above
76+
# to set the build mode to "manual" for that language. Then modify this step
77+
# to build your code.
6378
# ℹ️ Command-line programs to run using the OS shell.
6479
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65-
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.
68-
69-
# - run: |
70-
# echo "Run, Build Application using script"
71-
# ./location_of_script_within_repo/buildscript.sh
80+
- if: matrix.build-mode == 'manual'
81+
shell: bash
82+
run: |
83+
echo 'If you are using a "manual" build mode for one or more of the' \
84+
'languages you are analyzing, replace this with the commands to build' \
85+
'your code, for example:'
86+
echo ' make bootstrap'
87+
echo ' make release'
88+
exit 1
7289
7390
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
91+
uses: github/codeql-action/analyze@v3
7592
with:
7693
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)