Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 395a4a490caf4670115f7312828a3bd4bd6fded5
Choose a base ref
..
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9e9604b3a7b9a45367bc35ee95d82b6a7ebd8752
Choose a head ref
Showing with 4 additions and 10 deletions.
  1. +4 −10 src/ci/docker/run.sh
14 changes: 4 additions & 10 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
@@ -86,19 +86,13 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
echo "::group::Building docker image for $image"
echo "Image checksum ${cksum}"

docker buildx create --use --driver docker-container
# On PR jobs, we don't have permissions to write to the cache, so we should not use `docker login` nor caching.
if [ "$PR_CI_JOB" -eq 1 ]
then
retry docker \
buildx \
build \
--rm \
-t rust-ci \
-f "$dockerfile" \
--cache-from type=registry,ref=ghcr.io/rust-lang-ci/rust-ci:${cksum} \
--output=type=docker \
"$context"
retry docker build --rm -t rust-ci -f "$dockerfile" "$context"
else
docker buildx create --use --driver docker-container

# Login to Docker registry
echo ${DOCKER_TOKEN} | docker login ghcr.io --username rust-lang-ci --password-stdin
retry docker \