Skip to content

Update update-feature-branches.yaml #31

Update update-feature-branches.yaml

Update update-feature-branches.yaml #31

name: Update feature Branches
on:
push:
branches:
- main
jobs:
update-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- name: Merge master back to feature
run: |
git fetch --unshallow
git pull
for branch in $(git branch -r --list "origin/feature/*"); do
git checkout -b "$branch" "origin/$branch"
git merge main
if [ $? -ne 0 ]; then
git merge --abort
git reset --hard HEAD
fi
done