mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 03:00:13 +08:00
Gate the new registries input behind version constraints
This commit is contained in:
@@ -255,6 +255,7 @@ export const CODEQL_VERSION_ML_POWERED_QUERIES = "2.7.5";
|
||||
const CODEQL_VERSION_LUA_TRACER_CONFIG = "2.10.0";
|
||||
export const CODEQL_VERSION_CONFIG_FILES = "2.10.1";
|
||||
const CODEQL_VERSION_LUA_TRACING_GO_WINDOWS_FIXED = "2.10.4";
|
||||
export const CODEQL_VERSION_GHES_PACK_DOWNLOAD = "2.10.5";
|
||||
|
||||
/**
|
||||
* This variable controls using the new style of tracing from the CodeQL
|
||||
|
||||
@@ -9,6 +9,7 @@ import * as semver from "semver";
|
||||
import * as api from "./api-client";
|
||||
import {
|
||||
CodeQL,
|
||||
CODEQL_VERSION_GHES_PACK_DOWNLOAD,
|
||||
CODEQL_VERSION_ML_POWERED_QUERIES,
|
||||
CODEQL_VERSION_ML_POWERED_QUERIES_WINDOWS,
|
||||
ResolveQueriesOutput,
|
||||
@@ -1842,6 +1843,14 @@ export async function downloadPacks(
|
||||
let qlconfigFile: string | undefined;
|
||||
let registriesAuthTokens: string | undefined;
|
||||
if (registries) {
|
||||
if (
|
||||
!(await codeQlVersionAbove(codeQL, CODEQL_VERSION_GHES_PACK_DOWNLOAD))
|
||||
) {
|
||||
throw new Error(
|
||||
`'registries' input is not supported on CodeQL versions less than ${CODEQL_VERSION_GHES_PACK_DOWNLOAD}.`
|
||||
);
|
||||
}
|
||||
|
||||
// generate a qlconfig.yml file to hold the registry configs.
|
||||
const qlconfig = createRegistriesBlock(registries);
|
||||
qlconfigFile = path.join(tmpDir, "qlconfig.yml");
|
||||
|
||||
Reference in New Issue
Block a user