githubgithub-actions

Get current job name in Github Actions workflow


I want to reference the running job name in one of its steps. These are the options Github gives us: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-context. The closer one I see is "job.container.id". Would that give me the name I set to the job? It doesn't sound like it. Unfortunately, I can't no longer test this since I exceeded the limit of free Github Actions usage


Solution

  • github.job might get you the job name

    Link to documentation: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

    enter image description here