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

This commit is contained in:
giles 2023-10-23 10:38:23 +01:00
parent 4b27ee0434
commit a5e72f3421
1 changed files with 3 additions and 6 deletions

View File

@ -43,26 +43,23 @@ jobs:
CI_COMMIT_AUTHOR: Continuous Integration CI_COMMIT_AUTHOR: Continuous Integration
run: | run: |
git branch -r git branch -r
git diff origin/origin/develop/hhhaaawwww
# git diff origin/${{ env.DEVELOPMENT_BRANCH }}
echo "git diff origin/${{ env.DEVELOPMENT_BRANCH }}"
- name: diff - name: diff
env: env:
CI_COMMIT_MESSAGE: converted to yml for review. CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration CI_COMMIT_AUTHOR: Continuous Integration
run: | run: |
if [[ $(git branch -r | grep origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -eq 0 ]]; then if [[ $(git branch -r | grep origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -eq 0 ]]; then
git push origin HEAD:origin/${{ env.DEVELOPMENT_BRANCH }}; git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea; curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
chmod +x ./tea; chmod +x ./tea;
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}; ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }};
if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then
./tea pr c --base=origin/master --head=origin/${{ env.DEVELOPMENT_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}" ./tea pr c --base=master --head=${{ env.DEVELOPMENT_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}"
fi fi
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 origin HEAD:origin/${{ env.DEVELOPMENT_BRANCH }}; git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
else else
echo 'no changes so no push' echo 'no changes so no push'
fi; fi;