From 13ccce4c18869ea98d4cbe4d0c0c4aea06984a46 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 5 Nov 2024 20:39:54 +0100 Subject: [PATCH] reduce parititon size for raspberry pi image --- .github/workflows/build-images.yml | 1 + src/build_dist | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 74c7fcfe..f0bd4f1f 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -140,6 +140,7 @@ jobs: echo "export ROOT_PWD=${{ secrets.ROOT_PASSWORD }}" >> config echo "export SSH_PUB_KEY='${{ secrets.SSH_KEY }}'" >> config echo "export FEEDER_IMAGE_NAME=${feeder_image_name}" >> config + echo "export IMG_NAME=${IMG_NAME}" >> config echo "feeder_image_name=${feeder_image_name}" >> $GITHUB_OUTPUT # finally, try one more time to have ALL the tags - to avoid weird errors in the code # creating the version name - and also update `latest` in case that was wrong as well diff --git a/src/build_dist b/src/build_dist index ea3cedae..36059921 100755 --- a/src/build_dist +++ b/src/build_dist @@ -3,6 +3,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${DIR}/config" +# make raspberry pi image as mall as we can +if [[ "$IMG_NAME" == "raspberrypi64-pi-2-3-4-5" ]]; then + export BASE_IMAGE_ENLARGEROOT=0 + export BASE_IMAGE_RESIZEROOT=0 +fi + export DIST_PATH=${DIR} export CUSTOM_PI_OS_PATH=$(<"${DIR}/custompios_path") export PATH=$PATH:$CUSTOM_PI_OS_PATH