diff --git a/.woodpecker.yml b/.woodpecker.yml index c3c4d66..36ea6dc 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -78,7 +78,7 @@ pipeline: - HEADER=$HEADER" Bearer $WATCHTOWER_HTTP_API_TOKEN" - curl -H $HEADER -i "https://$${WATCHTOWER_HOST}/v1/update" - notify-matrix: + notify-matrix-success: image: code.balsillie.net/containers/woodpecker-util pull: false environment: @@ -90,4 +90,24 @@ pipeline: - sleep 60 - shoutrrr send --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} - --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has completed and been deployed." \ No newline at end of file + --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has completed and been deployed." + when: + status: + - success + + notify-matrix-failure: + image: code.balsillie.net/containers/woodpecker-util + pull: false + environment: + *vars + secrets: + - source: MATRIX_ACCESS_TOKEN + target: MATRIX_ACCESS_TOKEN + commands: + - sleep 60 + - shoutrrr send + --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} + --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has failed." + when: + status: + - failure \ No newline at end of file