@@ -117,7 +117,6 @@ function extractPayloadAnnotations(payload: GithubEventPayload): Record<string,
117117 head_commit : payload . head_commit ?. id , // SHA of the head commit
118118 after : payload . after , // SHA after the event
119119 ref : payload . ref , // Branch or tag ref
120- workflow : payload . workflow , // Workflow name
121120 release : { } , // Will be populated if this is a release event
122121 pull_request : { } , // Will be populated if this is a pull request event
123122 } ;
@@ -171,6 +170,7 @@ function extractPayloadAnnotations(payload: GithubEventPayload): Record<string,
171170 * - GITHUB_REPOSITORY: Repository in the format owner/repo
172171 * - GITHUB_SERVER_URL: Base URL of the GitHub server (defaults to https://github.com)
173172 * - GITHUB_EVENT_PATH: Path to the event payload file (JSON)
173+ * - GITHUB_WORKFLOW: Name of the workflow
174174 *
175175 * Notes for maintainers:
176176 * - The event payload can be large; consider truncating or parsing if only specific fields are needed.
@@ -191,6 +191,10 @@ export const resolveGithubAnnotations = (): GithubAnnotations => {
191191 const runId = process . env . GITHUB_RUN_ID || 'unknown' ;
192192 // Extract repository in the format owner/repo
193193 const repository = process . env . GITHUB_REPOSITORY || 'unknown' ;
194+
195+ // Extract workflow name
196+ const workflow = process . env . GITHUB_WORKFLOW || 'unknown' ;
197+
194198 // Extract server URL (defaults to public GitHub if not set)
195199 const serverUrl = process . env . GITHUB_SERVER_URL || 'https://github.com' ;
196200 // Extract event payload path and read payload if available
@@ -216,6 +220,7 @@ export const resolveGithubAnnotations = (): GithubAnnotations => {
216220 runId,
217221 repository,
218222 runUrl,
223+ workflow,
219224 ...extractPayloadAnnotations ( payload ) ,
220225 } ;
221226 // Return the resolved annotation variables
0 commit comments