Skip to content

Commit

Permalink
Update update-feature-branches.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Carvin-Yu authored Jan 7, 2024
1 parent 2922f84 commit 196a826
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/update-feature-branches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ jobs:
run: |
git fetch --unshallow
git pull
for branch in $(git branch -r --list "origin/feature/*"); do
branch_name=$(echo $branch | sed 's/origin\///')
git checkout -B $branch_name $branch
git pull
git merge main
if [ $? -ne 0 ]; then
git merge --abort
git reset --hard HEAD
fi
git push origin $branch_name
if git merge main --no-commit; then
git commit -m "Merge main into $branch_name"
git push origin $branch_name
else
git merge --abort
git reset --hard HEAD
continue
fi
done

0 comments on commit 196a826

Please sign in to comment.