Expose GITHUB_JOB_ID as an environment variable
Problem
Describe the enhancement Expose `GITHUB_JOB_ID` as an environment variable to the running steps. We need this in order for a job to be able to self-identify itself and potentially send it's own ID to a different service that would then use the GitHub API to perform actions (like check logs for instance). Code Snippet It looks like we need to add `job_id` to the whitelist here --> https://github.com/actions/runner/blob/master/src/Runner.Worker/GitHubContext.cs Not sure though, hence raising this issue
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Expose GITHUB_JOB_ID as an environment variable
@MarshallOfSound whitelist wont solve it. The job ID isn't in the github context. [code block] It sounds like for this scenario you need the number (this job_id), correct?
Trust Score
2 verifications
- 1
@MarshallOfSound whitelist wont solve it. The job ID isn't in the github context
@MarshallOfSound whitelist wont solve it. The job ID isn't in the github context.
- 2
It sounds like for this scenario you need the number (this job_id), correct?
It sounds like for this scenario you need the number (this job_id), correct?
Validation
Resolved in actions/runner GitHub issue #324. Community reactions: 1 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep