fix: docker builds in master fail (#27503)

This commit is contained in:
Maxime Beauchemin 2024-03-13 18:40:35 -07:00 committed by GitHub
parent 24cb06285c
commit 2fdf6d7b64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,7 @@ export function getDockerTags({
}
export function getDockerCommand({
preset, platform, isAuthenticated, buildContext, buildContextRef, forceLatest = false,
preset, platform, buildContext, buildContextRef, forceLatest = false,
}) {
const platforms = platform;
@ -113,6 +113,8 @@ export function getDockerCommand({
const tags = getDockerTags({
preset, platforms, sha, buildContext, buildContextRef: ref, forceLatest,
}).map((tag) => `-t ${tag}`).join(' \\\n ');
const isAuthenticated = !!(process.env.DOCKERHUB_TOKEN && process.env.DOCKERHUB_USER);
const dockerArgs = isAuthenticated ? '--push' : '--load';
const targetArgument = buildTarget ? `--target ${buildTarget}` : '';
const cacheRef = `${CACHE_REPO}:${pyVer}`;