@@ -128,7 +128,7 @@ build() {
128128 --build-arg " RUST_TARGET_FEATURES=$rust_target_features " \
129129 --build-arg " BAZEL_VERSION=$bazel_version " \
130130 --tag docker.io/materialize/ci-builder:" $tag " \
131- --tag ghcr.io/materialize /ci-builder:" $tag " \
131+ --tag ghcr.io/materializeinc /ci-builder:" $tag " \
132132 --tag materialize/ci-builder:" $cache_tag " \
133133 --target $docker_target \
134134 " $@ " ci/builder
@@ -169,20 +169,25 @@ print(hash.decode())
169169' )
170170cache_tag=cache-$flavor -$rust_version -$arch_go
171171
172+ image_registry=" materialize"
173+ if ui_is_truthy " ${CI:- 0} " ; then
174+ image_registry=" ghcr.io/materializeinc"
175+ fi
172176
173177case " $cmd " in
174178 build)
175179 build " $@ "
176180 ;;
177181 exists)
178- docker manifest inspect materialize /ci-builder:" $tag " & > /dev/null
182+ docker manifest inspect " $image_registry " /ci-builder:" $tag " & > /dev/null
179183 ;;
180184 tag)
181185 echo " $tag "
182186 ;;
183187 push)
184188 build " $@ "
185189 docker push materialize/ci-builder:" $tag "
190+ docker push ghcr.io/materializeinc/ci-builder:" $tag "
186191 docker push materialize/ci-builder:" $cache_tag "
187192 ;;
188193 run)
@@ -243,6 +248,7 @@ case "$cmd" in
243248 --env AZURE_SERVICE_ACCOUNT_TENANT
244249 --env GCP_SERVICE_ACCOUNT_JSON
245250 --env GITHUB_TOKEN
251+ --env GITHUB_GHCR_TOKEN
246252 --env GPG_KEY
247253 --env LAUNCHDARKLY_API_TOKEN
248254 --env LAUNCHDARKLY_SDK_KEY
@@ -392,7 +398,7 @@ case "$cmd" in
392398 args+=(--volume " $GIT_ROOT_DIR :$GIT_ROOT_DIR " )
393399 fi
394400 rm -f " $cid_file "
395- docker run " ${args[@]} " " materialize /ci-builder:$tag " eatmydata " ${docker_command[@]} "
401+ docker run " ${args[@]} " " $image_registry /ci-builder:$tag " eatmydata " ${docker_command[@]} "
396402 ;;
397403 root-shell)
398404 docker exec --interactive --tty --user 0:0 " $( < " $cid_file " ) " eatmydata ci/builder/root-shell.sh
0 commit comments