From 0a9867b0ef097e179e05fc1f9bdceb524d71e12a Mon Sep 17 00:00:00 2001 From: Hector Castejon Diaz Date: Fri, 19 Jul 2024 14:56:33 +0200 Subject: [PATCH] Add PR number --- .github/workflows/integration-pr.yml | 7 ++++--- .../workflows/{integration-tests.yml => sdk-nightly.yml} | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) rename .github/workflows/{integration-tests.yml => sdk-nightly.yml} (92%) diff --git a/.github/workflows/integration-pr.yml b/.github/workflows/integration-pr.yml index a968fc4e..216683c5 100644 --- a/.github/workflows/integration-pr.yml +++ b/.github/workflows/integration-pr.yml @@ -39,6 +39,7 @@ jobs: # To test changes the ref to the current branch. gh api -X POST -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - -f 'inputs[checkRunId]=${{ steps.checkrun.outputs.checkId }}' \ - -f "ref=run-tests" \ - /repos/${{ github.repository }}/actions/workflows/integration-tests.yml/dispatches \ No newline at end of file + -f 'inputs[check_run_id]=${{ steps.checkrun.outputs.checkId }}' \ + -f 'inputs[pull_request_number]=${{ github.events.pull_request.number }}' \ + -f "ref=${{ github.ref_name }}" \ + /repos/${{ github.repository }}/actions/workflows/sdk-nightly.yml/dispatches \ No newline at end of file diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/sdk-nightly.yml similarity index 92% rename from .github/workflows/integration-tests.yml rename to .github/workflows/sdk-nightly.yml index 606304d4..3aad5dc7 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/sdk-nightly.yml @@ -2,9 +2,13 @@ name: Integration Tests on: workflow_dispatch: inputs: - checkRunId: + check_run_id: description: "ID for the Check Run in a PR" type: string + required: false + pull_request_number: + description: "Pull request number to test (if empty, tests run against main)" + required: false jobs: myEvent: