Skip to content

Commit 69fd9e9

Browse files
authored
Merge pull request #4024 from github/mbg/private-registry/make-docker-available
Always make `docker_registry` registries available
2 parents cf46341 + b855687 commit 69fd9e9

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

lib/entry-points.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ const gitSourceCredential = {
128128
token: "mno",
129129
};
130130

131+
const dockerRegistryCredential = {
132+
type: "docker_registry",
133+
host: "https://registry.example.com",
134+
token: "pqr",
135+
};
136+
131137
test("getCredentials prefers registriesCredentials over registrySecrets", async (t) => {
132138
const registryCredentials = Buffer.from(
133139
JSON.stringify([
@@ -633,6 +639,7 @@ test("getCredentials returns only ALWAYS_ENABLED_REGISTRY_TYPE credentials for A
633639
const credentialsInput = toEncodedJSON([
634640
...mixedCredentials,
635641
gitSourceCredential,
642+
dockerRegistryCredential,
636643
]);
637644

638645
const credentials = startProxyExports.getCredentials(

src/start-proxy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ function isPAT(value: string) {
192192
* enabled, because generic CodeQL workflow components may use them rather than just
193193
* language-specific components.
194194
*/
195-
export const ALWAYS_ENABLED_REGISTRY_TYPE = ["git_source"] as const;
195+
export const ALWAYS_ENABLED_REGISTRY_TYPE = [
196+
"git_source",
197+
"docker_registry",
198+
] as const;
196199

197200
type RegistryMapping = Partial<Record<BuiltInLanguage, string[]>>;
198201

0 commit comments

Comments
 (0)