summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-05-20 10:39:34 +0200
committerJosh Stone <cuviper@gmail.com>2025-05-24 09:33:30 -0700
commiteafa0f9b2374db88ab7bd23064753eca2e6b82dd (patch)
tree1ebf882f535e3bb825dcc84ddf28bb3170441464
parent1272ff814f25a866edd7b06ed3c8db857ef9a125 (diff)
downloadrust-eafa0f9b2374db88ab7bd23064753eca2e6b82dd.tar.gz
rust-eafa0f9b2374db88ab7bd23064753eca2e6b82dd.zip
Use Docker cache from the current repository
This is needed to make the cache work after moving CI from the `rust-lang-ci` org to `rust-lang`.

(cherry picked from commit eb530325f08b9151cb1917d01a8cb913ab1dd1ab)
-rwxr-xr-xsrc/ci/docker/run.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 36f7df2b069..4e69fb2f370 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -97,9 +97,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
     docker --version
 
     REGISTRY=ghcr.io
-    # Hardcode username to reuse cache between auto and pr jobs
-    # FIXME: should be changed after move from rust-lang-ci
-    REGISTRY_USERNAME=rust-lang-ci
+    # Default to `rust-lang` to allow reusing the cache for local builds
+    REGISTRY_USERNAME=${GITHUB_REPOSITORY_OWNER:-rust-lang}
     # Tag used to push the final Docker image, so that it can be pulled by e.g. rustup
     IMAGE_TAG=${REGISTRY}/${REGISTRY_USERNAME}/rust-ci:${cksum}
     # Tag used to cache the Docker build