forked from Ivasoft/github-actions
Compare commits
3 Commits
v0.1
...
renovate/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3e8c2e3f5 | ||
|
|
b4057e26e5 | ||
|
|
a8d4a08f79 |
@@ -47,7 +47,8 @@ steps:
|
|||||||
|
|
||||||
## Running locally
|
## Running locally
|
||||||
|
|
||||||
1. Running actions/hello-world-javascript-action action locally via docker:
|
1. If you are running it on mac locally & /var/run/docker.sock file does not exist, first run this command `ln -s ~/.docker/run/docker.sock /var/run/docker.sock`
|
||||||
|
2. Running actions/hello-world-javascript-action action locally via docker:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ func main() {
|
|||||||
Usage: "Webhook event payload",
|
Usage: "Webhook event payload",
|
||||||
EnvVar: "PLUGIN_EVENT_PAYLOAD",
|
EnvVar: "PLUGIN_EVENT_PAYLOAD",
|
||||||
},
|
},
|
||||||
|
cli.StringFlag{
|
||||||
|
Name: "actor",
|
||||||
|
Usage: "User that triggered the event",
|
||||||
|
EnvVar: "PLUGIN_ACTOR",
|
||||||
|
},
|
||||||
|
|
||||||
// daemon flags
|
// daemon flags
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@@ -179,6 +184,7 @@ func run(c *cli.Context) error {
|
|||||||
Verbose: c.Bool("action-verbose"),
|
Verbose: c.Bool("action-verbose"),
|
||||||
Image: c.String("action-image"),
|
Image: c.String("action-image"),
|
||||||
EventPayload: c.String("event-payload"),
|
EventPayload: c.String("event-payload"),
|
||||||
|
Actor: c.String("actor"),
|
||||||
},
|
},
|
||||||
Daemon: daemon.Daemon{
|
Daemon: daemon.Daemon{
|
||||||
Registry: c.String("docker.registry"),
|
Registry: c.String("docker.registry"),
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ type (
|
|||||||
Env map[string]string
|
Env map[string]string
|
||||||
Image string
|
Image string
|
||||||
EventPayload string // Webhook event payload
|
EventPayload string // Webhook event payload
|
||||||
|
Actor string
|
||||||
Verbose bool
|
Verbose bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,6 +68,12 @@ func (p Plugin) Exec() error {
|
|||||||
"--detect-event",
|
"--detect-event",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional arguments
|
||||||
|
if p.Action.Actor != "" {
|
||||||
|
cmdArgs = append(cmdArgs, "--actor")
|
||||||
|
cmdArgs = append(cmdArgs, p.Action.Actor)
|
||||||
|
}
|
||||||
|
|
||||||
if p.Action.EventPayload != "" {
|
if p.Action.EventPayload != "" {
|
||||||
if err := ioutil.WriteFile(eventPayloadFile, []byte(p.Action.EventPayload), 0644); err != nil {
|
if err := ioutil.WriteFile(eventPayloadFile, []byte(p.Action.EventPayload), 0644); err != nil {
|
||||||
return errors.Wrap(err, "failed to write event payload to file")
|
return errors.Wrap(err, "failed to write event payload to file")
|
||||||
|
|||||||
6
renovate.json
Normal file
6
renovate.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user