From cc79460d7d09ff4624be0ae7a83284d07b880744 Mon Sep 17 00:00:00 2001 From: Shivam Goyal Date: Wed, 24 May 2023 19:31:49 +0530 Subject: [PATCH] TP-00000 | Fix Validate Release PR GH Action (#6609) --- ...validation.yml => validate_release_pr.yml} | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) rename .github/workflows/{release_pr_validation.yml => validate_release_pr.yml} (95%) diff --git a/.github/workflows/release_pr_validation.yml b/.github/workflows/validate_release_pr.yml similarity index 95% rename from .github/workflows/release_pr_validation.yml rename to .github/workflows/validate_release_pr.yml index 7e5bc05574..ac1112213e 100644 --- a/.github/workflows/release_pr_validation.yml +++ b/.github/workflows/validate_release_pr.yml @@ -1,20 +1,19 @@ -name: Release PR check +name: Release PR CI on: pull_request: - branches: - - release/* - types: [opened, reopened, synchronize] + branches: [ release-* ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: - check_release_pr: + validate-pr: runs-on: [ default ] - steps: - - - name: Checkout code - uses: actions/checkout@v2 - + - name: Checkout Repository + uses: actions/checkout@v3 - name: Check if link to original PR is added in PR body run: | ORIGINAL_PR_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -o "https://github.cmd.navi-tech.in/${{ github.repository }}/pull/[0-9]*" | grep -o "[0-9]*") @@ -28,7 +27,6 @@ jobs: echo "Link to original PR raised against development branch not found in current PR body" exit 1 fi - - name: Check if PR title matches original PR title run: | ORIGINAL_PR_NUMBER=$(echo ${{ github.event.pull_request.body }} | grep -o "https://github.cmd.navi-tech.in/${{ github.repository }}/pull/[0-9]*" | grep -o "[0-9]*") @@ -42,7 +40,6 @@ jobs: echo "Current PR title does not match original PR title raised against development branch" exit 1 fi - - name: Check if original PR is merged in development branch run: | ORIGINAL_PR_NUMBER=$(echo ${{ github.event.pull_request.body }} | grep -o "https://github.cmd.navi-tech.in/${{ github.repository }}/pull/[0-9]*" | grep -o "[0-9]*") @@ -57,7 +54,6 @@ jobs: echo "Status: Fail. Original PR is not merged in development branch." exit 1 fi - - name: Check if current PR changes are subset of original PR changes run: | ORIGINAL_PR_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -o "https://github.cmd.navi-tech.in/${{ github.repository }}/pull/[0-9]*" | grep -o "[0-9]*")