mirror of https://github.com/actions/toolkit
feat: add runAttempt to Context
parent
457303960f
commit
3ceed57c65
|
@ -17,6 +17,7 @@ export class Context {
|
|||
actor: string
|
||||
job: string
|
||||
runNumber: number
|
||||
runAttempt: number
|
||||
runId: number
|
||||
apiUrl: string
|
||||
serverUrl: string
|
||||
|
@ -45,6 +46,7 @@ export class Context {
|
|||
this.actor = process.env.GITHUB_ACTOR as string
|
||||
this.job = process.env.GITHUB_JOB as string
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10)
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT as string, 10)
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10)
|
||||
this.apiUrl = process.env.GITHUB_API_URL ?? `https://api.github.com`
|
||||
this.serverUrl = process.env.GITHUB_SERVER_URL ?? `https://github.com`
|
||||
|
|
Loading…
Reference in New Issue