buildx(build): handle domain when checking git auth token secret
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -310,9 +310,11 @@ export class Build {
|
||||
return res.join(',');
|
||||
}
|
||||
|
||||
public static hasGitAuthTokenSecret(secrets: string[]): boolean {
|
||||
public static hasGitAuthTokenSecret(secrets: string[], domain?: string): boolean {
|
||||
for (const secret of secrets) {
|
||||
if (secret.startsWith('GIT_AUTH_TOKEN=')) {
|
||||
if (domain && secret.startsWith(`GIT_AUTH_TOKEN.${domain}=`)) {
|
||||
return true;
|
||||
} else if (secret.startsWith('GIT_AUTH_TOKEN=')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user