retry icon indicating copy to clipboard operation
retry copied to clipboard

How to retry another GitHub Action?

Open ThePieMonster opened this issue 1 year ago • 6 comments

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 }}

ThePieMonster avatar Aug 07 '22 21:08 ThePieMonster

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.

andry81 avatar Aug 18 '22 23:08 andry81

+1 for this feature.

skrdgraph avatar Oct 14 '22 05:10 skrdgraph

bump

Maxersh avatar Jan 17 '23 04:01 Maxersh

+1 for this feature.

leovido avatar May 30 '23 07:05 leovido

I found this other Action for this specific scenario https://github.com/marketplace/actions/retry-action

matteovivona avatar Aug 11 '23 09:08 matteovivona

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.

mikeage avatar Nov 28 '23 04:11 mikeage