Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 1

Check Suite identifier as an environment variable

To be able to identify all jobs as being part of a specific workflow run, would it be possible to provide a common identifier as part of the default environemnt variables?

 

Notice, the $GITHUB_SHA is not a good option as it would be the same for several workflow runs (e.g. push and pull_request).

 

I guess a good choice would be the "check-suite-id"?

Currently, such identifier could be obtained in a very awkward way via the API, by querying the associated with the workflow "check-suite-id", using the current SHA and the "github-actions" App ID:  

 

GITHUB_CHECK_SUITE_ID = `curl -s https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/check-suites?app_id=15368 | jq -r '.check_suites[0].id'`

 

But again, as using $GITHUB_SHA it is not that much better.

 

It would be nice to also have each job's "check-run-id" and/or "check-run-name".