Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/actions/merge-main/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,25 @@ runs:
return
fi

failed="false"

for branch in "${branches[@]}"; do
echo "...switching to branch: $branch"
git switch "$branch"
echo "...merging main"
git merge -m "misc: merge from main" origin/main
if [ $? -eq 0 ]; then
if git merge -m "misc: merge from main" origin/main; then
echo "...pushing to origin"
git push origin "$branch"
else
echo "...merge failed"
failed="true"
git merge --abort
fi
done

if [ "$failed" == "true" ]; then
exit 1
fi
}

merge_main