File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ interface Specification extends JobSpecification {
3838 versions ?: string [ ] ;
3939 /** Operating system prefixes used to select runner images (e.g. `["ubuntu", "macos"]`). */
4040 operatingSystems ?: string [ ] ;
41+ /** Per-OS version overrides. If specified for an OS, only those versions are tested on that OS. */
42+ osCodeQlVersions ?: Record < string , string [ ] > ;
4143 /** Whether to use the all-platform CodeQL bundle. */
4244 useAllPlatformBundle ?: string ;
4345 /** Values for the `analysis-kinds` matrix dimension. */
@@ -317,6 +319,13 @@ function generateJobMatrix(
317319 const operatingSystems = checkSpecification . operatingSystems ?? [ "ubuntu" ] ;
318320
319321 for ( const operatingSystem of operatingSystems ) {
322+ // If osCodeQlVersions is set for this OS, only include the specified CodeQL versions.
323+ const allowedVersions =
324+ checkSpecification . osCodeQlVersions ?. [ operatingSystem ] ;
325+ if ( allowedVersions && ! allowedVersions . includes ( version ) ) {
326+ continue ;
327+ }
328+
320329 const runnerImagesForOs = runnerImages . filter ( ( image ) =>
321330 image . startsWith ( operatingSystem ) ,
322331 ) ;
You can’t perform that action at this time.
0 commit comments