Skip to content

Commit fad6173

Browse files
committed
fix: Resolve matrix error at CodeQL workflow
Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
1 parent 66322d6 commit fad6173

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

.github/workflows/codeql.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
# - https://gh.io/supported-runners-and-hardware-resources
2828
# - https://gh.io/using-larger-runners (GitHub.com only)
2929
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
3031
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
3132
permissions:
3233
# required for all workflows
@@ -49,9 +50,9 @@ jobs:
4950
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
5051
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
5152
# 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
53+
matrix:
54+
language: [ 'python', 'javascript-typescript', '' ] # Define your languages here
5255

53-
# matrix:
54-
# include:
5556
steps:
5657
- name: Checkout repository
5758
uses: actions/checkout@v4
@@ -62,18 +63,12 @@ jobs:
6263
# - name: Setup runtime (example)
6364
# uses: actions/setup-example@v1
6465

65-
- name: Check if language is set
66-
if: "${{ matrix.language == '' }}"
67-
run: |
68-
echo "No language detected. Skipping analysis."
69-
exit 0
70-
7166
# Initializes the CodeQL tools for scanning.
7267
- name: Initialize CodeQL
7368
uses: github/codeql-action/init@v3
7469
with:
7570
languages: ${{ matrix.language }}
76-
build-mode: ${{ matrix.build-mode }}
71+
# build-mode: ${{ matrix.build-mode }}
7772
# If you wish to specify custom queries, you can do so here or in a config file.
7873
# By default, queries listed here will override any specified in a config file.
7974
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -87,15 +82,15 @@ jobs:
8782
# to build your code.
8883
# ℹ️ Command-line programs to run using the OS shell.
8984
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
90-
- if: matrix.build-mode == 'manual'
91-
shell: bash
92-
run: |
93-
echo 'If you are using a "manual" build mode for one or more of the' \
94-
'languages you are analyzing, replace this with the commands to build' \
95-
'your code, for example:'
96-
echo ' make bootstrap'
97-
echo ' make release'
98-
exit 1
85+
# - if: matrix.build-mode == 'manual'
86+
# shell: bash
87+
# run: |
88+
# echo 'If you are using a "manual" build mode for one or more of the' \
89+
# 'languages you are analyzing, replace this with the commands to build' \
90+
# 'your code, for example:'
91+
# echo ' make bootstrap'
92+
# echo ' make release'
93+
# exit 1
9994

10095
- name: Perform CodeQL Analysis
10196
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)