You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
51
45
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
52
46
# 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
55
47
48
+
# matrix:
49
+
# include:
56
50
steps:
57
51
- name: Checkout repository
58
52
uses: actions/checkout@v4
@@ -63,12 +57,22 @@ jobs:
63
57
# - name: Setup runtime (example)
64
58
# uses: actions/setup-example@v1
65
59
60
+
- name: Check if language is set
61
+
if: ${{ matrix.language == '' }}
62
+
run: |
63
+
echo "::warning::No language detected. Skipping analysis."
64
+
65
+
- name: Cancel Workflow
66
+
if: ${{ matrix.language == '' }}
67
+
uses: andymckay/cancel-action@0.4
68
+
66
69
# Initializes the CodeQL tools for scanning.
67
70
- name: Initialize CodeQL
71
+
if: ${{ matrix.language != '' }}
68
72
uses: github/codeql-action/init@v3
69
73
with:
70
74
languages: ${{ matrix.language }}
71
-
#build-mode: ${{ matrix.build-mode }}
75
+
build-mode: ${{ matrix.build-mode }}
72
76
# If you wish to specify custom queries, you can do so here or in a config file.
73
77
# By default, queries listed here will override any specified in a config file.
74
78
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -82,17 +86,18 @@ jobs:
82
86
# to build your code.
83
87
# ℹ️ Command-line programs to run using the OS shell.
84
88
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
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
89
+
- if: ${{ matrix.build-mode == 'manual' }}
90
+
shell: bash
91
+
run: |
92
+
echo 'If you are using a "manual" build mode for one or more of the' \
93
+
'languages you are analyzing, replace this with the commands to build' \
0 commit comments