retry
retry copied to clipboard
How to retry another GitHub Action?
If I have a GitHub Action for deploying content to Azure, how can I retry this deployment step if the deployment fails?
- uses: nick-fields/retry@v2
id: retry
# see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
continue-on-error: true
with:
timeout_seconds: 15
max_attempts: 2
retry_on: error
command: node -e 'process.exit(99);'
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.APP_NAME }}
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
package: ${{ env.APP_DIR }}
Interested in this too, but for the ad-m/github-push-action
action. Needs to retry the entire job because the push could not be retried without the pull and so complete rerun. The Job error can happen on any step, but only the push error must trigger the retry.
+1 for this feature.
bump
+1 for this feature.
I found this other Action for this specific scenario https://github.com/marketplace/actions/retry-action
I found this other Action for this specific scenario https://github.com/marketplace/actions/retry-action
This looks promising, but it can't be set to retry based on an output value (e.g., if there's an exit code X retry, but not for Y). The repo here does, but doesn't work with actions.