get action job id

is it possible to retreive the action job id?

Thank you very much

Angelo

1 Like

Not today.  As part of launching our API later this month you will be able to do that.

2 Likes

Hi, do you have updates to get the action job id?

Thank you

Angelo

4 Likes

Would it be available via context variable to access within the job itself?

GITHUB_RUN_ID is available as an environment variable.

In the github context, you can get this with github.run_id.

Here are the docs: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context

I’m afraid that the value has been asked for is “job id” not RUN_ID.

Below is a sample return from a Github API: https://api.github.com/repos/trung/test-github-actions/actions/runs/59355962/jobs

{
  "total_count": 3,
  "jobs": [
    {
      "id": 520876130,
      "run_id": 59355962,
...

However, I noticed that there’s a new github.job context variable to return “job id”

Still, it’s not the same from the API, but i guess it would work for context of the question