Compare commits
No commits in common. "master" and "1ee71fcc4ebb09b542436599c27788da4c9bd246" have entirely different histories.
master
...
1ee71fcc4e
@ -26,16 +26,3 @@ pipeline:
|
||||
- "${CI_COMMIT_TAG}"
|
||||
when:
|
||||
event: [tag]
|
||||
|
||||
notify:
|
||||
image: registry.t-juice.club/plugin-gotify
|
||||
pull: true
|
||||
settings:
|
||||
gotify_url: https://gotify.t-juice.club
|
||||
gotify_token:
|
||||
from_secret: gotify_token
|
||||
title: plugin-gotify updated
|
||||
message: latest update to ${CI_COMMIT_SHA:0:8}
|
||||
when:
|
||||
branch: master
|
||||
event: [push]
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache curl jq
|
||||
RUN apk add --no-cache curl
|
||||
COPY entrypoint.sh /bin/entrypoint.sh
|
||||
CMD ["/bin/entrypoint.sh"]
|
@ -1,5 +1,3 @@
|
||||
![status-badge](https://ci.t-juice.club/api/badges/torjus/plugin-gotify/status.svg)
|
||||
|
||||
# plugin-gotify
|
||||
|
||||
Plugin for woodpecker to send messages to gotify.
|
||||
|
@ -1,21 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
|
||||
echo "PLUGIN_GOTIFY_URL is not set";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${PLUGIN_GOTIFY_TOKEN} ]; then
|
||||
echo "PLUGIN_GOTIFY_TOKEN is not set";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
STATUS_CODE=$(curl -s --output "$OUTPUT_FILE" --write-out "%{http_code}" "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5")
|
||||
if [ "$STATUS_CODE" -ne "200" ]; then
|
||||
echo "Failed to send message:"
|
||||
cat "$OUTPUT_FILE" | jq .
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat "$OUTPUT_FILE" | jq .
|
||||
# TODO: Verify that variables are set properly
|
||||
curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5"
|
Loading…
Reference in New Issue
Block a user