1 Commits

Author SHA1 Message Date
Tyler Perkins
58d59d7aec Add main branch restriction 2022-12-16 21:23:35 -05:00
2 changed files with 5 additions and 13 deletions

View File

@@ -1,10 +1,6 @@
# drone-ntfy
[![Build Status](https://drone.clortox.com/api/badges/tyler/drone-ntfy/status.svg?ref=refs/heads/main)](https://drone.clortox.com/tyler/drone-ntfy)
A [Drone](https://drone.io) plugin for [ntfy](https://ntfy.sh).
Find the container on [docker hub](https://hub.docker.com/repository/docker/clortox/drone-ntfy).
A [Drone](https://drone.io) plugin for ntfy.
## Example
@@ -39,8 +35,8 @@ your configuration.
| Title | PLUGIN_TITLE | N/A | Title of the notification |
| Tags | PLUGIN_TAGS | N/A | Emojis on the notification |
| Click | PLUGIN_CLICK | N/A | URL to navigate to if the user clicks the notification |
| Attach | PLUGIN_ATTACH | N/A | URL or localfile to attach |
| Icon | PLUGIN_ICON | N/A | Icon to display |
| Attach (TODO) | PLUGIN_ATTACH | N/A | URL or localfile to attach |
| Icon (TODO) | PLUGIN_ICON | N/A | Icon to display |
| URL | PLUGIN_URL | ntfy.sh | URL to send the notification to |
| Topic | PLUGIN_TOPIC | drone-notifications | The notification top to send this to |
| Message | PLUGIN_MESSAGE | Pipeline Finished! | The body of the notification |

View File

@@ -16,10 +16,6 @@ Message=${PLUGIN_MESSAGE:-Pipeline finished!}
Username=${PLUGIN_USERNAME:-}
Password=${PLUGIN_PASSWORD:-}
if [[ ! -z $Username ]] || [[ ! -z $Password ]]; then
UParam="-u $Username:$Password"
fi
if [[ ! -z $Priority ]]; then
Priority="-H Priority:$Priority"
fi
@@ -44,5 +40,5 @@ if [[ ! -z $Icon ]]; then
Icon="-H Icon:$Icon"
fi
curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic