Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: retry another github action #137

Open
jduan-highnote opened this issue Jul 1, 2024 · 4 comments
Open

Feature Request: retry another github action #137

jduan-highnote opened this issue Jul 1, 2024 · 4 comments
Assignees

Comments

@jduan-highnote
Copy link

Is it possible to retry another github action? For example, if my workflow uses the following to install a JDK:

      - name: Retry Set up JDK if failed
        uses: actions/setup-java@v4
        with:
          distribution: 'zulu'
          java-version: 21

Is it possible to use this action to retry it?

My current workaround is this:

      - name: Set up JDK
        id: setup_jdk
        uses: actions/setup-java@v4
        with:
          distribution: 'zulu'
          java-version: 21
      - name: Sleep a bit
        run: sleep 5
      - name: Retry Set up JDK if failed
        if: steps.setup_jdk.outcome == 'failure'
        uses: actions/setup-java@v4
        with:
          distribution: 'zulu'
          java-version: 21

which is not elegant.

@nick-fields
Copy link
Owner

I'm not sure there is a (reliable) way to load an action via another action, so I can't do anything about it here.

@jduan-highnote
Copy link
Author

Thanks for the quick response! Do you have a better workaround than mine? Thanks!

@shayki5
Copy link

shayki5 commented Jul 4, 2024

@jduan-highnote I think you can use this:
https://github.com/Wandalen/wretry.action

@jduan-highnote
Copy link
Author

@shayki5 thank you for sharing! I'll check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants