Action failing but working just fine locally #59476
Replies: 2 comments 1 reply
-
It seems like you're running into conflicts because your editorial-preview branch has diverged from your main branch, causing the rebase operation to fail. You're using the git rebase command, which tries to reapply commits on top of another base tip. When it encounters a commit that doesn't apply cleanly, it will pause and give you a chance to resolve the conflict. In your case, it seems like it's encountering conflicts with several files. Here are a few suggestions: Make sure to fetch the latest branches: Before you do any operations, make sure to fetch the latest state of your branches with git fetch origin. Use git pull instead of git rebase: If you simply want to update the editorial-preview branch with the latest changes from main, you might want to consider using git pull origin main instead of git rebase origin/main. This will merge the latest changes from main into editorial-preview. Use git merge instead of git rebase: Similarly, you could use git merge origin/main, which will also merge the latest changes from main into editorial-preview. Resolve conflicts manually: If you still want to use git rebase, you will need to resolve the conflicts manually when they appear. You can do this by editing the files, fixing the conflicts, and then adding the resolved files with git add. After that, you can continue the rebase with git rebase --continue. Remember: rebasing is a powerful tool, but it can also be destructive if not used correctly. Always make sure to fully understand the state of your branches before performing a rebase. It's also worth noting that the GitHub Actions runner does not keep state between runs, so it will always checkout the editorial-preview branch from the remote repository, not any local changes you've made. If none of these suggestions help, please provide more context about the state of your branches, and I'll do my best to provide further assistance. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hello!
I'm currently working on a GitHub action with the aim of keeping the editorial-preview branch updated with main.
The action looks as follows:
I've tested locally (running it when I push to my test branch instead of main) and it works fine, but then when I change to execute it when pushing main, and after merging my changes to main it fails with the following error:
It doesn't make sense to me, because editorial-preview branch has just been created from main, there are no conflicts.
I'd appreciate any comments/suggestions you have.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions