Commit ca8bec4f authored by fredix's avatar fredix
Browse files

update variables

parent 96e4e1a3
......@@ -8,9 +8,9 @@ https://docs.drone.io/plugins/examples/golang/
## environment variables :
```
PLUGIN_ENDPOINT=https://gotify.server.tld
PLUGIN_TOKEN=APPLICATION_TOKEN
PLUGIN_TITLE="from drone-gotify"
PLUGIN_MESSAGE="test"
PLUGIN_PRIORITY=5
```
\ No newline at end of file
PLUGIN_GOTIFY_ENDPOINT="https://gotify.server.tld"
PLUGIN_GOTIFY_TOKEN="APPLICATION_TOKEN"
PLUGIN_GOTIFY_TITLE="from drone-gotify"
PLUGIN_GOTIFY_MESSAGE="test"
PLUGIN_GOTIFY_PRIORITY="5"
```
......@@ -8,11 +8,11 @@ import (
)
func main() {
token := os.Getenv("PLUGIN_TOKEN")
endpoint := os.Getenv("PLUGIN_ENDPOINT")
title := os.Getenv("PLUGIN_TITLE")
message := os.Getenv("PLUGIN_MESSAGE")
priority := os.Getenv("PLUGIN_PRIORITY")
token := os.Getenv("PLUGIN_GOTIFY_TOKEN")
endpoint := os.Getenv("PLUGIN_GOTIFY_ENDPOINT")
title := os.Getenv("PLUGIN_GOTIFY_TITLE")
message := os.Getenv("PLUGIN_GOTIFY_MESSAGE")
priority := os.Getenv("PLUGIN_GOTIFY_PRIORITY")
resp, err := http.PostForm(endpoint + "/message?token=" + token, url.Values{"message": {message}, "title": {title}, "priority": {priority}})
if resp != nil {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment