This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch fix_docker_js_bot in repository https://gitbox.apache.org/repos/asf/superset.git
commit f354320da08f45daa694419900e5468f4b629d90 Author: Maxime Beauchemin <maximebeauche...@gmail.com> AuthorDate: Wed Mar 13 17:03:58 2024 -0700 fix: docker builds in master fail Bug slipped through for logic that executes only post-merge. This should fix the issue observed here https://github.com/apache/superset/actions/runs/8272961124/job/22635811674 For context I recently translated the docker-build logic from python to JS so that I'd all be under `supersetbot` --- .github/supersetbot/src/docker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/supersetbot/src/docker.js b/.github/supersetbot/src/docker.js index c287e6ae18..1bf9695c23 100644 --- a/.github/supersetbot/src/docker.js +++ b/.github/supersetbot/src/docker.js @@ -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}`;