From caa15ed4eee987620fa274149e577cd79aba67c8 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 14 Jan 2025 13:15:44 -0500 Subject: [PATCH] . --- .gitea/workflows/deployment.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index a0b06451..d4611aa0 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -26,12 +26,11 @@ jobs: run: | tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }} tea login default gitea-rinoa - echo "Checking if PR exists for ${{ github.ref_name }}" - tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state + echo "Checking if PR exists for ${{ github.ref_name }}..." tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep -q '${{ github.ref_name }}' if [ $? -eq 0 ]; then echo "PR exists, checking state..." - pr_state=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep '${{ github.ref_name }}' | awk -F',' '{print $4}' | sed -e 's|"||g') + pr_state=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep '${{ github.ref_name }}' | head -1 | awk -F',' '{print $4}' | sed -e 's|"||g') echo "PR state: ${pr_state}" if [ "${pr_state}" != 'open' ]; then echo "PR does not exist, creating..."