about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-05-20 10:39:34 +0200
committerJakub Beránek <berykubik@gmail.com>2025-05-20 10:39:34 +0200
commiteb530325f08b9151cb1917d01a8cb913ab1dd1ab (patch)
treee53a9a8b54e2fb0dceb47f58fca1eb3b5a52e55b /src/ci/docker
parenta8e4c68dcb4dc1e48a0db294c5323cab0227fcb9 (diff)
downloadrust-eb530325f08b9151cb1917d01a8cb913ab1dd1ab.tar.gz
rust-eb530325f08b9151cb1917d01a8cb913ab1dd1ab.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`.
Diffstat (limited to 'src/ci/docker')
-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