Merge pull request #4024 from github/mbg/private-registry/make-docker-available

Always make `docker_registry` registries available
This commit is contained in:
Michael B. Gale authored and GitHub committed 2026-07-21 10:58:49 +00:00
commit 69fd9e97ba
3 files changed
+15 -2

No files matched your search

+4 -1
View File
@@ -162056,7 +162056,10 @@ function isPAT(value) {
GITHUB_PAT_FINE_GRAINED_PATTERN
]);
}
var ALWAYS_ENABLED_REGISTRY_TYPE = ["git_source"];
var ALWAYS_ENABLED_REGISTRY_TYPE = [
"git_source",
"docker_registry"
];
var LANGUAGE_TO_REGISTRY_TYPE = {
actions: [],
cpp: [],
+7
View File
@@ -128,6 +128,12 @@ const gitSourceCredential = {
token: "mno",
};
const dockerRegistryCredential = {
type: "docker_registry",
host: "https://registry.example.com",
token: "pqr",
};
test("getCredentials prefers registriesCredentials over registrySecrets", async (t) => {
const registryCredentials = Buffer.from(
JSON.stringify([
@@ -633,6 +639,7 @@ test("getCredentials returns only ALWAYS_ENABLED_REGISTRY_TYPE credentials for A
const credentialsInput = toEncodedJSON([
...mixedCredentials,
gitSourceCredential,
dockerRegistryCredential,
]);
const credentials = startProxyExports.getCredentials(
+4 -1
View File
@@ -192,7 +192,10 @@ function isPAT(value: string) {
* enabled, because generic CodeQL workflow components may use them rather than just
* language-specific components.
*/
export const ALWAYS_ENABLED_REGISTRY_TYPE = ["git_source"] as const;
export const ALWAYS_ENABLED_REGISTRY_TYPE = [
"git_source",
"docker_registry",
] as const;
type RegistryMapping = Partial<Record<BuiltInLanguage, string[]>>;