File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
tools/toolchain-nativelink Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 4343 DOCKERFILE_HASH=$(sha256sum "$GITHUB_WORKSPACE/tools/toolchain-nativelink/Dockerfile" | awk '{print $1}')
4444 IMAGE_DETAILS=$(aws ecr describe-images --repository-name ${{ secrets.RBE_ECR_REPOSITORY_NAME }} --image-ids imageTag=$DOCKERFILE_HASH)
4545 if [ $? -ne 0 ]; then
46+ echo "Run tools/toolchain-nativelink/toolchain-nativelink.sh locally and upload a new version of the stock image"
4647 exit 1;
4748 fi
4849 echo "RBE_IMAGE=${{ secrets.RBE_ECR_AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.RBE_ECR_AWS_ACCOUNT_REGION }}.amazonaws.com/${{ secrets.RBE_ECR_REPOSITORY_NAME }}:$DOCKERFILE_HASH" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
2424 python3=3.10.6-1~22.04 \
2525 python3-minimal=3.10.6-1~22.04 \
2626 libpython3-stdlib=3.10.6-1~22.04 \
27- curl=7.81.0-1ubuntu1.17 \
28- ca-certificates=20230311ubuntu0. 22.04.1 \
27+ curl=7.81.0-1ubuntu1.20 \
28+ ca-certificates=20240203~ 22.04.1 \
2929 && apt-get clean \
3030 && rm -rf /var/lib/apt/lists/*
3131
Original file line number Diff line number Diff line change 22
33set -xeuo pipefail
44
5- ECR=${ECR:? Error : ECR is not set }
5+ ECR=${ECR:- 299166832260 }
66ECR_PROFILE=${ECR_PROFILE:? Error: ECR_PROFILE is not set}
7- ECR_USER=${ECR_USER:? Error : ECR_USER is not set }
8- ECR_REGION=${ECR_REGION:? Error : ECR_REGION is not set }
9- BUILDX_NO_CACHE=${BUILDX_NO_CACHE:- true }
7+ ECR_USER=${ECR_USER:- AWS }
8+ ECR_REGION=${ECR_REGION:- us-east-2 }
9+ BUILDX_NO_CACHE=${BUILDX_NO_CACHE:- false }
1010
1111function ecr_login() {
1212 aws ecr get-login-password --profile " ${ECR_PROFILE} " --region " ${ECR_REGION} " | docker login --username " ${ECR_USER} " --password-stdin " ${ECR} .dkr.ecr.${ECR_REGION} .amazonaws.com"
2323fi
2424
2525# Build the Docker image and tag it with the hash
26- docker buildx build --no-cache=" ${BUILDX_NO_CACHE} " --platform linux/amd64 -t " ${ECR} .dkr.ecr.${ECR_REGION} .amazonaws.com/nativelink-rbe:$IMAGE_TAG " -f ' Dockerfile' .
26+ docker buildx build --no-cache=" ${BUILDX_NO_CACHE} " --platform linux/amd64 -t " ${ECR} .dkr.ecr.${ECR_REGION} .amazonaws.com/nativelink-rbe:$IMAGE_TAG " --load - f ' Dockerfile' .
2727
2828ecr_login
2929docker push " ${ECR} .dkr.ecr.${ECR_REGION} .amazonaws.com/nativelink-rbe:$IMAGE_TAG "
You can’t perform that action at this time.
0 commit comments