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

support: action failed with "fetch first" hint #1078

Open
3 tasks done
raubel opened this issue May 18, 2024 · 4 comments
Open
3 tasks done

support: action failed with "fetch first" hint #1078

raubel opened this issue May 18, 2024 · 4 comments
Assignees
Labels
support User support

Comments

@raubel
Copy link

raubel commented May 18, 2024

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 question

First of all, thanks for this awesome action !

I'm using it from a job with a matrix configuration, so the action may run concurrently.

Sometimes, it fails because the gh-pages branch is not up-to-date (see logs).

Any advice to prevent this?

Relevant links

My repository is private.

Relevant log output

Push the commit or tag
  /usr/bin/git push origin gh-pages
  To https://github.com/semarchy/mdm.git
   ! [rejected]        gh-pages -> gh-pages (fetch first)
  error: failed to push some refs to 'https://github.com/***/mdm.git'
  hint: Updates were rejected because the remote contains work that you do not
  hint: have locally. This is usually caused by another repository pushing to
  hint: the same ref. If you want to integrate the remote changes, use
  hint: 'git pull' before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"

Additional context.

My matrix configuration:

      matrix:
        browser: [ chrome, firefox ]
        java_version: [ "17", "21" ]

How I have configured the step:

      - name: Upload report to GH Pages
        uses: peaceiris/actions-gh-pages@v4
        if: always()
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: playwright-report/
          destination_dir: "${{ env.TIMESTAMP }}/${{ matrix.browser }}/java${{ matrix.java_version }}/report"
@raubel raubel added the support User support label May 18, 2024
@raubel
Copy link
Author

raubel commented May 18, 2024

Note that I see discussion here, but in my case I do want my jobs to run in parallel.

@peaceiris
Copy link
Owner

Thanks, this seems to be related to #759

@raubel
Copy link
Author

raubel commented May 18, 2024

Thank you, indeed, a retry mechanism would help.
For now, I an using Wandalen retry action and it works fine.

@dezren39
Copy link

i would appreciate a retry mechanism, but i'm not sure it would help. this action pushes, another action before this did the pull. i think a fetch or force command is needed. more generically could be described be features such as a retry-mechanism, either pre-commit or on-retry script, 'git_push_additional_args'

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

No branches or pull requests

3 participants