We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0179596 commit 677b8edCopy full SHA for 677b8ed
.github/actions/merge-main/action.yml
@@ -86,19 +86,25 @@ runs:
86
return
87
fi
88
89
+ failed="false"
90
+
91
for branch in "${branches[@]}"; do
92
echo "...switching to branch: $branch"
93
git switch "$branch"
94
echo "...merging main"
- git merge -m "misc: merge from main" origin/main
- if [ $? -eq 0 ]; then
95
+ if git merge -m "misc: merge from main" origin/main; then
96
echo "...pushing to origin"
97
git push origin "$branch"
98
else
99
echo "...merge failed"
100
+ failed="true"
101
git merge --abort
102
103
done
104
105
+ if [ "$failed" == "true" ]; then
106
+ exit 1
107
+ fi
108
}
109
110
merge_main
0 commit comments