-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Pull after commit #262
Comments
I think you're right, you'll need to commit before pulling and rebasing. With that said, I don't think I want to add a new input to change the command order: the fact that you can modify the pull strategy already makes the action complex, while this is meant just to be a quick way to commit and push changes. You haven't posted your workflow so I don't know exactly what inputs you're using, but here's what I can suggest: you can use the action without pulling and pushing, and then do it manually with a couple of git commands. pull_strategy: 'NO-PULL'
push: false You can then add a step that runs your two commands: - run: |
git pull --rebase
git push I hope this helps you solve your issue. I know that "just do it manually" may not be the answer you were expecting, but I think it's better to keep the action oriented towards the more basic functionalities. |
@EndBug Thank you for the long answer. I implemented it exactly this way. My question would be: pull will never work if there are uncommitted changes. Thus, why would one ever do a pull before a commit? Example output (https://github.com/latextemplates/LNCS/runs/3368317275)
|
It's not totally correct: running I love the idea of being able to customize the behavior of the action to better fit these use cases, but as of now, I'm not sure what would be the most effective and efficient way to add this kind of functionality. If you ever come up with a strategy that would allow the action to support these use cases while also working as usual with the more common ones, feel free to share it here so we can add it ;) |
Yeah, I just tried it with a MWE with two files. In my case, all the parallel branches create the same changes in a file (in the concrete case:
Sure, I will! Now seeing that this is really an edge case; and I can solve it with a short work-around, I will close the issue. |
I get following output (https://github.com/latextemplates/LNCS/runs/3606084744)
According to https://stackoverflow.com/a/43262939/873282 one should use |
The |
I am trying v8 today. With
In my normal git workflow, I would do As far as I understand your interpretation, you favor following git command sequence when committing something: |
My use case is:
pull_strategy: '--rebase'
setting)I think that @v7 first pulls and then commits. I think, it should be the other way round to ensure that a pull succeeds.
I cannot use
NO_PULL
, because there are surely updates for parallel job number 2 onwards (refs #187). It maybe is #67, but that issue is stale.git status:
output of action:
The text was updated successfully, but these errors were encountered: