From f1f43af000214d934b17ad11ab2fa8c369e2d6e3 Mon Sep 17 00:00:00 2001 From: kdivya153 <121901963+kdivya153@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:01:07 -0400 Subject: [PATCH] Update check-pr.yml --- .github/workflows/check-pr.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 2f66b518..852dd473 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -26,17 +26,19 @@ jobs: run: npm ci - name: Run validation and tests run: npm pack - trigger_repo_b_workflow: - name: Trigger Firebolt API Workflow - runs-on: ubuntu-latest - steps: - - name: Trigger MFOS Workflow - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: 'MFOS standalone sanity report - CORE,MANAGE,DISCOVERY' # Workflow in Repo B - token: ${{ secrets.GITHUB_TOKEN }} - repo: rdkcentral/firebolt-apis - inputs: - OPENRPC_PR_BRANCH:'${{ github.event.pull_request.head.ref }}' - + + - name: Trigger Workflow in Another Repository + run: + # Set the required variables + repo_owner=" rdkcentral" + repo_name="firebolt-apis" + event_type="trigger-workflow" + OPENRPC_PR_BRANCH="${{ github.event.pull_request.head.ref }}" + + curl -X POST https://api.github.com/repos/$repo_owner/$repo_name/dispatches \ + -H 'Accept:application/vnd.github.everest-preview+json' \ + -u "username:${{ secrets.SEMANTIC_RELEASE_BOT_PAT }}" \ + -d "{\"event_type\":\"$event_type\", \"client_payload\":{\"OPENRPC_PR_BRANCH\":\"$OPENRPC_PR_BRANCH\"}}" + +