forked from Ivasoft/github-actions
feat: expose actor argument (#9)
This commit is contained in:
@@ -30,6 +30,7 @@ type (
|
||||
Env map[string]string
|
||||
Image string
|
||||
EventPayload string // Webhook event payload
|
||||
Actor string
|
||||
Verbose bool
|
||||
}
|
||||
|
||||
@@ -67,6 +68,12 @@ func (p Plugin) Exec() error {
|
||||
"--detect-event",
|
||||
}
|
||||
|
||||
// optional arguments
|
||||
if p.Action.Actor != "" {
|
||||
cmdArgs = append(cmdArgs, "--actor")
|
||||
cmdArgs = append(cmdArgs, p.Action.Actor)
|
||||
}
|
||||
|
||||
if p.Action.EventPayload != "" {
|
||||
if err := ioutil.WriteFile(eventPayloadFile, []byte(p.Action.EventPayload), 0644); err != nil {
|
||||
return errors.Wrap(err, "failed to write event payload to file")
|
||||
|
||||
Reference in New Issue
Block a user