add some magic to merge to parent branch
This commit make it merge to parent branch instead of `master` branch, i.e. you are working on a branch called `refactor` and making a branch `release/2.0`, changes will be applied to `refactor` instead of `master`.
This commit is contained in:
@@ -94,7 +94,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Merge branch and push
|
- name: Merge branch and push
|
||||||
run: |
|
run: |
|
||||||
git checkout master
|
parent=$(git show-branch \
|
||||||
|
| grep -F '*' \
|
||||||
|
| grep -v "$(git rev-parse --abbrev-ref HEAD)" \
|
||||||
|
| head -n1 \
|
||||||
|
| sed 's/.*\[\(.*\)\].*/\1/' \
|
||||||
|
| sed 's/[\^~].*//')
|
||||||
|
git checkout ${parent}
|
||||||
git merge release/${{ env.BUILDVER }} --allow-unrelated-histories
|
git merge release/${{ env.BUILDVER }} --allow-unrelated-histories
|
||||||
git pull && git push && git push --tags
|
git pull && git push && git push --tags
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user