repository_dispatch checks on PR

Hello there,

I’m looking for checks on PRs based on the result of external tests that are yet configured to run when a pull request is created. I would like to use a RESTFULL api POST call to generate such checks.

I’ve created a workflow like the follwing one:

name:\<suit name\>on:
repository\_dispatch:
types:[\<weebhook key\>]jobs:
\<job-name\>:
runs-on:ubuntu-lateststeps:
      -run:echo ${{ github.event.client\_payload.message }}

And can generate the desired action with the following command:

curl -s -H "Accept: application/vnd.github.everest-preview+json" -H 'Authorization: token <AUTH TOKEN>' -X POST -d '{"event_type": "\<weebhook key\>","client_payload":{"message": "Test output","}}' https://api.github.com/repos/<user>/<repo>/dispatches

Nevertheless, I do not know how to associate that checks on a Pull request commit.

Is this a good approach or should I try something else?

I have a CICD environment running Jenkins and only want to print the output of each test in a different check.

Best regards.