diff --git a/.drone.yml b/.drone.yml index 0145e50..3fe82fc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -56,15 +56,14 @@ steps: - export COMMIT_TITLE="$(echo \"${DRONE_COMMIT_MESSAGE}\" | head -n1)" - echo "COMMIT_TITLE=$COMMIT_TITLE" >> /drone/env - - name: discord notification + - name: discord notification success image: appleboy/drone-discord settings: webhook_id: from_secret: discord_webhook_id webhook_token: from_secret: discord_webhook_token - color: > - $(if [ "${DRONE_BUILD_STATUS}" = "success" ]; then echo "#48f442"; else echo "#ff4f42"; fi) + color: "#48f442" message: - | ${DRONE_REPO} @@ -72,7 +71,25 @@ steps: Branch: ${DRONE_COMMIT_BRANCH} Link: ${DRONE_BUILD_LINK} when: - status: [success, failure] + status: [success] + + - name: discord notification failure + image: appleboy/drone-discord + settings: + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + color: "#ff4f42" + message: + - | + ${DRONE_REPO} + Commit: ${COMMIT_TITLE} + Branch: ${DRONE_COMMIT_BRANCH} + Link: ${DRONE_BUILD_LINK} + when: + status: [failure] + volumes: