From faa425440f86f9c16587a19dfb59491253a2c92a Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 28 Nov 2023 15:38:41 +0100 Subject: [PATCH] Add RUN_ATTEMPT to Github context --- packages/github/src/context.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index d3f65f7a..691c9690 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -16,6 +16,7 @@ export class Context { action: string actor: string job: string + runAttempt: number runNumber: number runId: number apiUrl: string @@ -44,6 +45,7 @@ export class Context { this.action = process.env.GITHUB_ACTION as string this.actor = process.env.GITHUB_ACTOR as string this.job = process.env.GITHUB_JOB as string + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT as string, 10) this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER 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`