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
job getting the key. get list of jobs for a workflow using API: /repos/{owner}/{repo}/actions/runs/{run_id}/jobs. find the job by the name and get id as int value.
Each job will run inside its own virtual machine runner, or inside a container, and has one or more steps that either run a script that you define or run an action, which is a reusable extension that can simplify your workflow.
github.ref. string. The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by push , this is the branch or tag ref that was pushed. For workflows triggered by pull_request , this is the pull request merge branch.
to tag a commit. push the tag to trigger the github action. github action sets the git tag as an env var. run install & build.
github.job
might get you the job name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With