1
1
mirror of https://github.com/drone-plugins/github-actions synced 2024-11-15 02:56:25 +01:00

feat: expose actor argument

This commit is contained in:
Riley Snyder 2023-01-09 12:59:30 -06:00
parent 6953a7e14a
commit 60178eb51c
2 changed files with 9 additions and 0 deletions

@ -81,6 +81,11 @@ func main() {
Usage: "Webhook event payload",
EnvVar: "PLUGIN_EVENT_PAYLOAD",
},
cli.StringFlag{
Name: "actor",
Usage: "User that triggered the event",
EnvVar: "PLUGIN_ACTOR",
},
// daemon flags
cli.StringFlag{
@ -179,6 +184,7 @@ func run(c *cli.Context) error {
Verbose: c.Bool("action-verbose"),
Image: c.String("action-image"),
EventPayload: c.String("event-payload"),
Actor: c.String("actor"),
},
Daemon: daemon.Daemon{
Registry: c.String("docker.registry"),

@ -30,6 +30,7 @@ type (
Env map[string]string
Image string
EventPayload string // Webhook event payload
Actor string
Verbose bool
}
@ -63,6 +64,8 @@ func (p Plugin) Exec() error {
secretFile,
"--env-file",
envFile,
"--actor",
p.Action.Actor,
"-b",
"--detect-event",
}