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
|
actor: string
|
||||||
job: string
|
job: string
|
||||||
runNumber: number
|
runNumber: number
|
||||||
|
runAttempt: number
|
||||||
runId: number
|
runId: number
|
||||||
apiUrl: string
|
apiUrl: string
|
||||||
serverUrl: string
|
serverUrl: string
|
||||||
|
@ -45,6 +46,7 @@ export class Context {
|
||||||
this.actor = process.env.GITHUB_ACTOR as string
|
this.actor = process.env.GITHUB_ACTOR as string
|
||||||
this.job = process.env.GITHUB_JOB as string
|
this.job = process.env.GITHUB_JOB as string
|
||||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10)
|
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.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10)
|
||||||
this.apiUrl = process.env.GITHUB_API_URL ?? `https://api.github.com`
|
this.apiUrl = process.env.GITHUB_API_URL ?? `https://api.github.com`
|
||||||
this.serverUrl = process.env.GITHUB_SERVER_URL ?? `https://github.com`
|
this.serverUrl = process.env.GITHUB_SERVER_URL ?? `https://github.com`
|
||||||
|
|
Loading…
Reference in New Issue