From 0a579360e37263bfe503041729509e30006d95d3 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 26 Aug 2020 13:11:35 +0200 Subject: [PATCH] add webhook step to drone build to update ocis.owncloud.works Signed-off-by: David Christofas --- .drone.star | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.drone.star b/.drone.star index b383b2bf0..9bf384096 100644 --- a/.drone.star +++ b/.drone.star @@ -76,6 +76,7 @@ def main(ctx): readme(ctx), badges(ctx), website(ctx), + updateDeployment(ctx) ] return before + stages + after @@ -612,6 +613,46 @@ def binary(ctx, name): }, } +def updateDeployment(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'updateDeployment', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'webhook', + 'image': 'plugins/webhook', + 'settings': { + 'username': { + 'from_secret': 'webhook_username', + }, + 'password': { + 'from_secret': 'webhook_password', + }, + 'method': 'GET', + 'urls': 'https://ocis.owncloud.works/hooks/update-ocis', + } + } + ], + 'depends_on': [ + 'amd64', + 'arm64', + 'arm', + 'linux', + 'darwin', + 'windows', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + ], + } + } + def manifest(ctx): return { 'kind': 'pipeline',