.....
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

@ -61,7 +61,25 @@ jobs:
echo 'pushed new branch and created pr'; echo 'pushed new branch and created pr';
else else
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
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 else
echo 'no changes so no push' echo 'no changes so no push'
fi; fi;