diff --git a/.drone.yml b/.drone.yml index 3e008c1..c8a49dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,13 +1,33 @@ -name: php builder +name: build and publish image kind: pipeline type: docker + steps: -- name: php +- name: build and publish image: plugins/docker settings: - repo: nickslowinski/robotter112 - tags: php + repo: nickslowinski/robotter112.de-php-docker + tags: + - '7.4' + - '7' username: - from_secret: docker_username + from_secret: ns_docker_username password: - from_secret: docker_password \ No newline at end of file + from_secret: ns_docker_password + when: + branch: + - release/v7.4 +- name: send telegram notification + image: appleboy/drone-telegram + settings: + token: + from_secret: tg-drone-bot-token + to: + from_secret: tg-robotter112.de-chat-id + message_file: telegram-notification.tpl + depends_on: + - build and publish + when: + status: + - failure + - success \ No newline at end of file diff --git a/telegram-notification.tpl b/telegram-notification.tpl new file mode 100644 index 0000000..ee9b2ef --- /dev/null +++ b/telegram-notification.tpl @@ -0,0 +1,7 @@ +Build abgeschlossen für *{{repo.owner}}/{{repo.name}}* +Status: *{{build.status}}* +Build-ID: {{build.number}} +Commit: `[{{truncate commit.sha 8}}]({{commit.link}})` + +Start: {{datetime build.started}} +Ende: {{datetime build.finished}} \ No newline at end of file