Skip to content

Commit a6c950a

Browse files
Add GITHUB_TRIGGERING_ACTOR to GH context (#60)
1 parent 09fc534 commit a6c950a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

actions.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,16 @@ type GitHubContext struct {
489489
// but to use the Repo method instead.
490490
RepositoryOwner string
491491

492-
RetentionDays int64
493-
RunAttempt int64
494-
RunID int64
495-
RunNumber int64
496-
ServerURL string
497-
SHA string
498-
StepSummary string
499-
Workflow string
500-
Workspace string
492+
RetentionDays int64
493+
RunAttempt int64
494+
RunID int64
495+
RunNumber int64
496+
ServerURL string
497+
SHA string
498+
StepSummary string
499+
TriggeringActor string
500+
Workflow string
501+
Workspace string
501502

502503
// Event is populated by parsing the file at EventPath, if it exists.
503504
Event map[string]any
@@ -659,6 +660,9 @@ func (c *Action) Context() (*GitHubContext, error) {
659660
if v := c.getenv("GITHUB_STEP_SUMMARY"); v != "" {
660661
githubContext.StepSummary = v
661662
}
663+
if v := c.getenv("GITHUB_TRIGGERING_ACTOR"); v != "" {
664+
githubContext.TriggeringActor = v
665+
}
662666
if v := c.getenv("GITHUB_WORKFLOW"); v != "" {
663667
githubContext.Workflow = v
664668
}

0 commit comments

Comments
 (0)