How to get the GitHub CI job build id (check_run_id)?

I am using build.cake file tasks with PowerShell script on the windows machine for GitHub CI. Am trying to get the check_run_id via GitHub Actions in the workflows .yml file. Is that possible?


I need the id(2508655272) value in workflows.yml file. I have attached my workflow file.

I have tried to get check_run_id value from the GitHub parameter itself, checked the GitHub documentation. There is no option found to get the check_run_id directly.

Is there any way to get check_run_id?

Could you suggest a solution for how to achieve this in my workflow .yml file or any other alternate way to get it?