From 5f86cb01f6170812bbb972320a9b56c3351a6677 Mon Sep 17 00:00:00 2001 From: laityts Date: Sat, 30 Jul 2022 21:21:54 +0800 Subject: [PATCH] Optimize the file judgment logic --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a708da..341a8bc 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,11 @@ jobs: fi fi ls - FILENAME="$(ls -lS * | head -1 | awk '{print $9}')" + FILENAME="$(find ./ -type f -size +300M | ls -lS * | head -1 | awk '{print $9}')" + if [[ -z "$FILENAME" ]]; then + exit 1 + echo "The file was not downloaded successfully" + fi echo "FILENAME: $FILENAME" FILENAME=$(basename ${FILENAME}) NAME=$(basename $FILENAME .zip)