Skip to content

Commit

Permalink
Retry The download because just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmella-v authored Mar 27, 2024
1 parent 258280e commit e5f04f2
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions .github/workflows/issuecomment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,31 @@ jobs:

- name: Download File
if: steps.verify_user.outputs.result == 'YES' && github.event.comment.body == '!accept'
id: download_file
shell: bash
run: |
set +e
python3 code/.github/DOWNLOAD_FILE.py >> result.txt
RESULT=$?
set -e
cat result.txt
echo "any silly errors?"
if [ -f silly_log.txt ]; then
cat silly_log.txt
fi
if [ $RESULT -eq 0 ]; then
echo push_entry=YES >> $GITHUB_OUTPUT
else
echo push_entry=NO >> $GITHUB_OUTPUT
fi
uses: nick-fields/retry@v3
with:
timeout_minutes: 2
max_attempts: 5
shell: bash
command: |
set +e
python3 code/.github/DOWNLOAD_FILE.py >> result.txt
RESULT=$?
set -e
cat result.txt
echo "any silly errors?"
if [ -f silly_log.txt ]; then
cat silly_log.txt
fi
if [ $RESULT -eq 0 ]; then
echo "Download successful, proceeding with next steps."
exit 0
else
echo "Download failed, retrying..."
exit 1
fi
env:
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
Expand Down

0 comments on commit e5f04f2

Please sign in to comment.