Compare commits
No commits in common. "master" and "1ee71fcc4ebb09b542436599c27788da4c9bd246" have entirely different histories.
master
...
1ee71fcc4e
@ -26,16 +26,3 @@ pipeline:
|
|||||||
- "${CI_COMMIT_TAG}"
|
- "${CI_COMMIT_TAG}"
|
||||||
when:
|
when:
|
||||||
event: [tag]
|
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
|
FROM alpine:latest
|
||||||
RUN apk add --no-cache curl jq
|
RUN apk add --no-cache curl
|
||||||
COPY entrypoint.sh /bin/entrypoint.sh
|
COPY entrypoint.sh /bin/entrypoint.sh
|
||||||
CMD ["/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-gotify
|
||||||
|
|
||||||
Plugin for woodpecker to send messages to gotify.
|
Plugin for woodpecker to send messages to gotify.
|
||||||
|
@ -1,21 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
|
# TODO: Verify that variables are set properly
|
||||||
echo "PLUGIN_GOTIFY_URL is not set";
|
curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5"
|
||||||
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 .
|
|
Loading…
Reference in New Issue
Block a user