Skip to content

Commit

Permalink
Update SkyHawk-SHRP.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mlm-games authored Aug 16, 2024
1 parent aff880f commit 0e28089
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/SkyHawk-SHRP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,17 @@ jobs:
- name: Check if the recovery exists
if: always()
run: |
if [ -f ${{ env.OUT_DIR }}/${{ inputs.BUILD_TARGET }}*.img ]; then
img_file=$(find "${{ env.OUT_DIR }}" -name "${{ inputs.BUILD_TARGET }}*.img" -print -quit)
zip_file=$(find "${{ env.OUT_DIR }}" -name "pbrp*.zip" -print -quit)
if [ -f "$img_file" ]; then
echo "CHECK_IMG_IS_OK=true" >> $GITHUB_ENV
echo "MD5_IMG=$(md5sum ${{ env.OUT_DIR }}/${{ inputs.BUILD_TARGET }}*.img | cut -d ' ' -f 1)" >> $GITHUB_ENV
echo "MD5_IMG=$(md5sum "$img_file" | cut -d ' ' -f 1)" >> $GITHUB_ENV
else
echo "Recovery out directory is empty."
fi
if [ -f ${{ env.OUT_DIR }}/SHRP*.zip ]; then
if [ -f "$zip_file" ]; then
echo "CHECK_ZIP_IS_OK=true" >> $GITHUB_ENV
echo "MD5_ZIP=$(md5sum ${{ env.OUT_DIR }}/SHRP*.zip | cut -d ' ' -f 1)" >> $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
Expand Down

0 comments on commit 0e28089

Please sign in to comment.