From 54adb4e08145ef40aa9a29cfbd5c49e965cdc9f1 Mon Sep 17 00:00:00 2001 From: Vladimir Eremin Date: Sun, 23 Aug 2026 15:48:11 +0300 Subject: [PATCH] fix(ci): clean up older dev/images from S3 bucket before upload to prevent BucketMaxSizeExceeded (#31) ### Summary of Changes - Added automatic cleanup of older images in `dev/images/` before uploading new golden image to prevent S3 bucket storage quota exhaustion. --- .github/workflows/ci-next-build-golden-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-next-build-golden-image.yml b/.github/workflows/ci-next-build-golden-image.yml index 3e8718f..a9815a9 100644 --- a/.github/workflows/ci-next-build-golden-image.yml +++ b/.github/workflows/ci-next-build-golden-image.yml @@ -125,6 +125,8 @@ jobs: if [ -n "${S3_BUCKET}" ] && [ -n "${AWS_ACCESS_KEY_ID}" ]; then ENDPOINT_FLAG="" [ -n "${S3_ENDPOINT}" ] && ENDPOINT_FLAG="--endpoint-url=${S3_ENDPOINT}" + echo "Cleaning up older images in dev/images/ to free bucket storage..." + aws ${ENDPOINT_FLAG} s3 rm "s3://${S3_BUCKET}/dev/images/" --recursive || true aws ${ENDPOINT_FLAG} s3 cp "output-qemu/${IMAGE_NAME}" "s3://${S3_BUCKET}/dev/images/${IMAGE_NAME}" echo "Golden image uploaded to s3://${S3_BUCKET}/dev/images/${IMAGE_NAME}" else