From 45e75607bb543e4ea9bf3c47cceae08b73e63624 Mon Sep 17 00:00:00 2001 From: ragebreaker <125530737+mlm-games@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:50:28 +0530 Subject: [PATCH] Update SkyHawk-SHRP.yml --- .github/workflows/SkyHawk-SHRP.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/SkyHawk-SHRP.yml b/.github/workflows/SkyHawk-SHRP.yml index 6a08ba9..7c9cfb5 100644 --- a/.github/workflows/SkyHawk-SHRP.yml +++ b/.github/workflows/SkyHawk-SHRP.yml @@ -157,6 +157,24 @@ jobs: lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) echo "Done building your ${{ github.event.inputs.BUILD_TARGET }}.img" + - name: Check if the recovery exists + if: always() + run: | + img_file=$(find "${{ env.OUTPUT_DIR }}" -name "${{ inputs.BUILD_TARGET }}*.img" -print -quit) + zip_file=$(find "${{ env.OUTPUT_DIR }}" -name "pbrp*.zip" -print -quit) + if [ -f "$img_file" ]; then + echo "CHECK_IMG_IS_OK=true" >> $GITHUB_ENV + echo "MD5_IMG=$(md5sum "$img_file" | cut -d ' ' -f 1)" >> $GITHUB_ENV + else + echo "Recovery out directory is empty." + fi + if [ -f "$zip_file" ]; then + echo "CHECK_ZIP_IS_OK=true" >> $GITHUB_ENV + echo "MD5_ZIP=$(md5sum "$zip_file" | cut -d ' ' -f 1)" >> $GITHUB_ENV + else + echo "::warning::The zip file isn't present but make sure the image is from only after 100% completion in build stage" + fi + - name: Set Build Date # Output will be use in Release run: | echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV