Skip to content

Commit cf0e734

Browse files
committed
chore: update CodeQL analysis to support multiple languages in ci.yml
1 parent bfcf01f commit cf0e734

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
# defining strategy for the job - matrix strategy for codeQL analysis
6666
strategy:
6767
fail-fast: false
68-
# matrix:
69-
# language: [ 'java' ]
68+
matrix:
69+
language: [ 'java', 'javascript' ]
7070
# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
7171
# # Use only 'java' to analyze code written in Java, Kotlin or both
7272
# # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
@@ -94,8 +94,7 @@ jobs:
9494
- name: Initialize CodeQL
9595
uses: github/codeql-action/init@v3
9696
with:
97-
languages: java
98-
# languages: ${{ matrix.language }} # defining the language for the CodeQL analysis
97+
languages: ${{ matrix.language }} # defining the language for the CodeQL analysis
9998
# debug: true # uncomment this line to enable debugging for CodeQL analysis step
10099
# If you wish to specify custom queries, you can do so here or in a config file.
101100
# By default, queries listed here will override any specified in a config file.
@@ -114,9 +113,10 @@ jobs:
114113
- name: Perform CodeQL Analysis
115114
uses: github/codeql-action/analyze@v3
116115
with:
117-
category: "/language:java"
118-
# category: "/language:${{matrix.language}}" # defining the language for the CodeQL analysis
116+
category: "/language:${{matrix.language}}" # defining the language for the CodeQL analysis
117+
119118
- uses: actions/upload-artifact@v4.4.3 # uploading the artifact to the GitHub Artifacts. Link to the documentation - https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts
119+
if: matrix.language == 'java' # upload the artifact only for the java language
120120
with:
121121
name: jar-artifact # naming the artifact jar file/s path
122122
path: target/ # actual relative path to the artifact in the container - target/

0 commit comments

Comments
 (0)