From 2772a7842babe8ec9470dbd1981742f7d35d8003 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 26 Dec 2024 18:09:16 -0500 Subject: [PATCH] Re-inserting rest of PR list step. --- .gitea/workflows/deployment.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index cf7aec39..7831effa 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -21,8 +21,13 @@ jobs: chmod +x /usr/local/bin/tea echo "Listing PRs..." tea login add --name gitea-rinoa --url ${{ vars.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }} - tea pr ls --repo ${{ github.repository }} --state open --output csv - + tea pr ls --repo ${{ github.repository }} --state open --output csv | egrep -q 'open' + echo "list_exit=$?" >> "$GITHUB_OUTPUT" + if [ ${list_exit} -eq 0 ]; then + echo "PR already exists. Skipping PR creation." + pr_index=$(tea pr ls --state open --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $1}' | sed -e 's|"||g') + echo "pr_index=$(echo ${pr_index})" >> "$GITHUB_OUTPUT" + - name: Create PR if: steps.list-prs.outputs.list_exit != 0 uses: arifer612/Gitea-PR-action@v1.2.0