55    branches : [ main ] 
66  workflow_dispatch :
77
8+ env :
9+   CODEQL_CLI_VERSION : 2.19.2 
10+ 
811jobs :
912  compile-and-test :
1013    runs-on : ubuntu-latest 
@@ -25,15 +28,12 @@ jobs:
2528            src: 
2629              - '${{ matrix.language }}/**' 
2730
28- name : Initialize  CodeQL
31+ name : Setup  CodeQL
2932        if : steps.changes.outputs.src == 'true' 
30-         run : | 
31-           VERSION="$(find "${{ runner.tool_cache }}/CodeQL/" -maxdepth 1 -mindepth 1 -type d -print \ 
32-                        | sort \ 
33-                        | tail -n 1 \ 
34-                        | tr -d '\n')" 
35-           echo "$VERSION/x64/codeql" >> $GITHUB_PATH 
36-          
33+         uses : ./.github/actions/install-codeql 
34+         with :
35+           codeql-cli-version : ${{ env.CODEQL_CLI_VERSION }} 
36+ 
3737      - name : Install Packs 
3838        if : steps.changes.outputs.src == 'true' 
3939        env :
@@ -171,14 +171,11 @@ jobs:
171171            src: 
172172              - '${{ matrix.language }}/ext/**' 
173173
174- name : Initialize  CodeQL
174+ name : Setup  CodeQL
175175        if : steps.changes.outputs.src == 'true' 
176-         run : | 
177-           VERSION="$(find "${{ runner.tool_cache }}/CodeQL/" -maxdepth 1 -mindepth 1 -type d -print \ 
178-                        | sort \ 
179-                        | tail -n 1 \ 
180-                        | tr -d '\n')" 
181-           echo "$VERSION/x64/codeql" >> $GITHUB_PATH 
176+         uses : ./.github/actions/install-codeql 
177+         with :
178+           codeql-cli-version : ${{ env.CODEQL_CLI_VERSION }} 
182179
183180      - name : Install Packs 
184181        if : steps.changes.outputs.src == 'true' 
@@ -209,14 +206,11 @@ jobs:
209206            src: 
210207              - '${{ matrix.language }}/ext-library-sources/**' 
211208
212- name : Initialize  CodeQL
209+ name : Setup  CodeQL
213210        if : steps.changes.outputs.src == 'true' 
214-         run : | 
215-           VERSION="$(find "${{ runner.tool_cache }}/CodeQL/" -maxdepth 1 -mindepth 1 -type d -print \ 
216-                        | sort \ 
217-                        | tail -n 1 \ 
218-                        | tr -d '\n')" 
219-           echo "$VERSION/x64/codeql" >> $GITHUB_PATH 
211+         uses : ./.github/actions/install-codeql 
212+         with :
213+           codeql-cli-version : ${{ env.CODEQL_CLI_VERSION }} 
220214
221215      - name : Install CodeQL 
222216        if : steps.changes.outputs.src == 'true' 
@@ -240,14 +234,11 @@ jobs:
240234            src: 
241235              - 'configs/**' 
242236
243-       - name : Initialize  CodeQL
237+       - name : Setup  CodeQL
244238        if : steps.changes.outputs.src == 'true' 
245-         run : | 
246-           VERSION="$(find "${{ runner.tool_cache }}/CodeQL/" -maxdepth 1 -mindepth 1 -type d -print \ 
247-                        | sort \ 
248-                        | tail -n 1 \ 
249-                        | tr -d '\n')" 
250-           echo "$VERSION/x64/codeql" >> $GITHUB_PATH 
239+         uses : ./.github/actions/install-codeql 
240+         with :
241+           codeql-cli-version : ${{ env.CODEQL_CLI_VERSION }} 
251242
252243      - name : " Check Configurations" 
253244        if : steps.changes.outputs.src == 'true' 
0 commit comments