From 65d441e3a74c7d694e4aecc2d3d361f7c1155764 Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Fri, 24 Nov 2023 10:46:43 +0800 Subject: [PATCH] ci: enable shallow clone in docker image generation to reduce image size Signed-off-by: Huaqi Fang <578567190@qq.com> --- .github/linuxsdk.Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/linuxsdk.Dockerfile b/.github/linuxsdk.Dockerfile index 5e4fbe7..1cb7dbb 100644 --- a/.github/linuxsdk.Dockerfile +++ b/.github/linuxsdk.Dockerfile @@ -60,12 +60,14 @@ ENV PATH "/home/$USER/prebuilt/qemu/bin:$PATH" RUN ldd `which qemu-system-riscv64` -RUN git clone -b $BRANCH https://github.com/Nuclei-Software/nuclei-linux-sdk +# do shallow clone for main repo +RUN git clone --depth 10 -b $BRANCH https://github.com/Nuclei-Software/nuclei-linux-sdk # gitee mirror no longer works #RUN cd nuclei-linux-sdk && git remote add gitee https://gitee.com/Nuclei-Software/nuclei-linux-sdk -RUN cd nuclei-linux-sdk && git submodule init && git submodule update --recursive --init +# only do shallow clone for submodule to reduce clone size +RUN cd nuclei-linux-sdk && git submodule init && git submodule update --recursive --init --depth 10 RUN cd nuclei-linux-sdk && make freeloader bootimages