.....
convert-to-yml / develop-branch (push) Successful in 31s Details

This commit is contained in:
giles 2023-10-23 12:16:51 +01:00
parent 6d9ff43810
commit ef69397ae4
1 changed files with 20 additions and 2 deletions

View File

@ -60,8 +60,26 @@ jobs:
fi
echo 'pushed new branch and created pr';
else
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
git -C ../cloned fetch origin #--depth=1
git -C ../cloned branch -r
git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH
mv ../cloned/.git ..
rm -rf ../cloned
cp -r . ../cloned
rm -rf ../cloned/.git
mv ../.git ../cloned
mv .git/config ../cloned/.git
rm -r ./*
rm -r .git
mv ../cloned/* .
mv ../cloned/.git .
git status
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
else
echo 'no changes so no push'
fi;