To expand on @Skenvy's answer, if the check that you want to rerun uses a matrix to run multiple variations, the list of check runs from the github api used in the "Rerequest check suite" step will have a different entry for each variation with different names but the same check id. To handle this case, we need to filter the output of that api call by checks whose name starts with JOB_NAME
(instead of matching exactly) and then get the unique values so the same ID doesn't get retriggered multiple times, which causes the "Rerequest check suite" step to fail.
Here's an updated jq
line you should use in the "Get check run ID" step that will do this:
jq '[.check_runs[] | select(.name | startswith("${{ env.JOB_NAME }}")) | select(.pull_requests != null) | select(.pull_requests[].number == ${{ env.PR_NUMBER }}) | .check_suite.id | tostring ] | map({(.):1}) | add | keys_unsorted[] | tonumber'