actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.91k stars 965 forks source link

Expose job name as env var #3281

Open edrevo opened 6 months ago

edrevo commented 6 months ago

This PR exposes the job display name as an environment variable. The job display name is exposed in webhooks as name(docs) so having it as an environment variable allows correlating data between the webhooks and processes that run in the runner.

This change would be specifically useful to improve Datadog's CI Visibility integration with GitHub Actions, where we currently require users to manually expose the job name as a variable for the integration to fully work (docs).

If this change is acceptable for the runner team, I am also happy to open a PR to update the documentation around default environment variables (docs).

edrevo commented 6 months ago

@Link- @nikola-jokic @TingluoHuang could this change be considered as an addition to the runner?

edrevo commented 5 months ago

Gentle ping on this one @Link- @nikola-jokic @TingluoHuang . Is there anything I can do to get this reviewed?

edrevo commented 3 months ago

@Link- @nikola-jokic @TingluoHuang 😢

c3charvat commented 1 month ago

This is a duplicate of #3489, and no one is reviewing this and @TingluoHuang closed this without merging before but hasn't replied why.

c3charvat commented 1 month ago

The simple fact of the matter is jobname+ matrix inputs exceeding 97 characters gets truncated... Which leads to job names that are unique on start but are not unique on the API search...

Tldr: truncating the uuid of a job is not good. Not giving you a uuid to search for is worse.