Skip to content

Commit

Permalink
retry always on
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetsharma21 committed Oct 11, 2024
1 parent 009edbe commit 50486a5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/sklearnserver-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,21 @@ jobs:

timeout-minutes: 10 # Time limit for each job

# Retry job that executes if the test job fails or is canceled
retry:
runs-on: ubuntu-latest
needs: test
if: ${{ always() }} # Always run this job after test
steps:
- name: Retry failed job due to timeout or cancellation
run: echo "Retrying job due to timeout failure or cancellation..."
- name: Check test result
id: check_result
run: |
if [[ "${{ needs.test.result }}" == "failure" ]] || [[ "${{ needs.test.result }}" == "cancelled" ]]; then
echo "Retrying job due to failure or cancellation..."
else
echo "No retry needed, exiting."
exit 0
fi
- name: Checkout source
uses: actions/checkout@v4
Expand Down

0 comments on commit 50486a5

Please sign in to comment.