From 8c0f4838a96fc9c653c3ef0adcd483ed9c932ba8 Mon Sep 17 00:00:00 2001 From: gilesb Date: Mon, 23 Oct 2023 14:21:34 +0100 Subject: [PATCH] . --- .gitea/workflows/build->develop.yml | 2 +- .gitea/workflows/develop -> build.yml | 28 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build->develop.yml b/.gitea/workflows/build->develop.yml index c3df6a9..b226caf 100644 --- a/.gitea/workflows/build->develop.yml +++ b/.gitea/workflows/build->develop.yml @@ -66,7 +66,7 @@ jobs: curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea; chmod +x ./tea; ./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 -o=csv | grep grep "\"master\",\"${{ env.DEVELOPMENT_BRANCH }}\"" | head -c1 | wc -c) -eq 0 ]]; then ./tea pr c --base=master --head=${{ env.DEVELOPMENT_BRANCH }} --description=" development pull request this PR is instigated by and will been built on [${{ github.ref_name }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }}) diff --git a/.gitea/workflows/develop -> build.yml b/.gitea/workflows/develop -> build.yml index 39b38eb..076b011 100644 --- a/.gitea/workflows/develop -> build.yml +++ b/.gitea/workflows/develop -> build.yml @@ -22,15 +22,6 @@ jobs: with: action: xml path: '.' - - name: get PR number - run: | - curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea - chmod +x ./tea - ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }} - pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1) - export PR="${pr//[\"\'\`]/}" - echo ::set-env name=PR::$PR - rm ./tea - run: git fetch - name: config run: | @@ -69,6 +60,25 @@ jobs: else echo 'no changes so no push' fi; + - name: make PR + run: | + curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea + chmod +x ./tea + ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }} + if [[ $(./tea pr ls -f=base,head -o=csv | grep grep "\"master\",\"${{ github.ref_name }}\"" | head -c1 | wc -c) -eq 0 ]]; then + ./tea pr c --base=master --head=${{ github.ref_name }} --description=" + development pull request + this PR is will been built on [${{ github.ref_name }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }}) + " -t="WIP: ${{ github.event.head_commit.message }}" + fi + - name: get PR number + run: | + curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea + chmod +x ./tea + pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1) + export PR="${pr//[\"\'\`]/}" + echo ::set-env name=PR::$PR + rm ./tea - name: make pull request comment run: | curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea