diff --git a/.gitea/workflows/branch-sonarscan-pr-merge.yml b/.gitea/workflows/branch-sonarscan-pr-merge.yml index 209d2f84..6228fad4 100644 --- a/.gitea/workflows/branch-sonarscan-pr-merge.yml +++ b/.gitea/workflows/branch-sonarscan-pr-merge.yml @@ -33,19 +33,17 @@ jobs: cat pr_status.json echo "pr_status=$(jq -c . pr_status.json)" >> "$GITHUB_OUTPUT" - - name: var test - run: | - echo "pr_status: ${{ steps.check-pr.outputs.pr_status }}" + - name: Status check + if: ${{ steps.check-pr.outputs.pr_status.state == 'closed' }} + run: echo "PR is closed, creating a new one..." - - - # - name: Get PR status - # id: get-pr-status - # uses: yakubique/json-utils@v1.8 - # with: - # input: '${{ toJSON(steps.check-pr.outputs.pr_status) }}' - # action: "get" - # key: "state" + - name: Get PR status + id: get-pr-status + uses: yakubique/json-utils@v1.8 + with: + input: '${{ toJSON(steps.check-pr.outputs.pr_status) }}' + action: "get" + key: "state" # Step 2: Create PR if none exists # - name: Create PR in Gitea # if: steps.check-pr.outputs.pr_http_status.state == 'closed'