-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Retry for non-fast-forward pushes #170
Comments
Thanks for reporting! I can see the pain point here. However, I'm really hesitant to solve this issue within Adding support for both I keep a private note with ideas for v5. Added solving such problems to that note. In the meantime, I'm sorry to say you have to solve this issue yourself in your Workflow. Feel free to share your solution here, so others can benefits from it. I will also update the Limitations section in the README in the next days. Will add "running in a build matrix" to that list. |
I finally found a working solution - unfortunately, by switching to another action: https://github.com/marketplace/actions/add-commit - name: Commit changes
uses: EndBug/add-and-commit@v7
with:
message: 'Update files based on generated files by template generator'
pull_strategy: 'NO-PULL'
push: false
- name: Push changes
run: |
git pull --rebase
git push Since I seem to be the only one asking here for such a thing and I found a workaround, I will close the issue. |
@koppor I'm glad you could solve the problem. |
@stefanzweifel Thank you for adding the link. The solution sketched above is written in length at EndBug/add-and-commit#262 (comment). |
@koppor if I want more assurance, how to add some retry loops to the
@stefanzweifel would |
No, there are no current plans to add support for retries using |
@stefanzweifel OK. My case is that I have multiple jobs concurrently triggered that commit separately to the same branch. |
Is your feature request related to a problem? Please describe.
I am running a build matrix, where each job updates another file. I want to have all updates committed. The second job outputs the following error:
Describe the solution you'd like
The action should do a pull if it encounters "non-fast-forward" as push result and then retry. In case it encounters that again, it should do another retry. It should do so until it succeeds (or maybe 100 tries are reached).
Describe alternatives you've considered
One could issue
git fetch
just before the action (similar to the proposal at #142 (comment)). However, if first job 2 rebases, then job 3, then job 2 commits and then job 3 commits, job 3 still fails.I also tried
skip_fetch: false
, but I still encounter this issue.This is not #102, because it is not a shallow update.
The text was updated successfully, but these errors were encountered: