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

proposal: auto-retry #759

Open
3 tasks done
vallyian opened this issue Jun 8, 2022 · 6 comments
Open
3 tasks done

proposal: auto-retry #759

vallyian opened this issue Jun 8, 2022 · 6 comments
Assignees
Labels

Comments

@vallyian
Copy link

vallyian commented Jun 8, 2022

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your proposal

Action fails intermitently due to concurrent updates

image

Describe the solution you'd like

Action should implement/support an auto retry mechanism e.g. retry: 3

Describe alternatives you've considered

Two consecutive steps for publishing where the second one only runs if the first one fails

Additional context

No response

@peaceiris
Copy link
Owner

I think the concurrency.group already resolves this instead.

jobs:
  deploy:
    runs-on: ubuntu-20.04
    permissions:
      contents: write
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:

@vallyian
Copy link
Author

vallyian commented Jun 8, 2022

That is an interesting idea, I wonder if it would work for different repos pushing to a central gh-pages repo, considering the same key

@peaceiris
Copy link
Owner

The current example workflow on README includes the approach already.
Please try the concurrency.group first.

name: GitHub Pages

on:
  push:
    branches:
      - main  # Set a branch name to trigger deployment
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-20.04
    permissions:
      contents: write
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: '0.85.0'

      - name: Build
        run: hugo --minify

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: ${{ github.ref == 'refs/heads/main' }}
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

@SavitaKhilnani
Copy link

@peaceiris, by adding
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

does not seem to solve the issue for me.

@dtyau
Copy link

dtyau commented Jul 17, 2023

+1 to this request.

Concurrency group would be undesirable for my situation. I'm using this action (thank you or this great action btw), to publish test reports and adding concurrency group would force our test workflow to run sequentially against different test targets.

Adding a git commit retry on this specific git local out of sync with remote error would be great.

@dezren39
Copy link

concurrency group also has the issue that it will cancel pending instead of waiting. it's not configurable.

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

No branches or pull requests

5 participants