mirror of https://github.com/actions/toolkit
github: Add runAttempt
Adds the runAttempt variable to the context object for easier access Signed-off-by: Eli Uriegas <eliuriegas@fb.com>pull/1027/head
parent
d1abf7dc74
commit
0505405a3e
|
@ -18,6 +18,7 @@ export class Context {
|
|||
job: string
|
||||
runNumber: number
|
||||
runId: number
|
||||
runAttempt: number
|
||||
apiUrl: string
|
||||
serverUrl: string
|
||||
graphqlUrl: string
|
||||
|
@ -46,6 +47,7 @@ export class Context {
|
|||
this.job = process.env.GITHUB_JOB as string
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10)
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10)
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT as string, 10)
|
||||
this.apiUrl = process.env.GITHUB_API_URL ?? `https://api.github.com`
|
||||
this.serverUrl = process.env.GITHUB_SERVER_URL ?? `https://github.com`
|
||||
this.graphqlUrl =
|
||||
|
|
Loading…
Reference in New Issue