From 7fb4c268f525d21c225ad0701b6d59471eb10d13 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 3 Jun 2020 22:58:30 +0200 Subject: [PATCH] fix: yaml help is on it's way --- .drone.yml | 13 ++++++++----- curl.it | 7 +++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100755 curl.it diff --git a/.drone.yml b/.drone.yml index b6d914e..c493357 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,12 +25,14 @@ trigger: steps: - name: call webhook pull: always - image: curlimages/curl:latest + image: bash:latest environment: ENDPOINT: from_secret: dockerhub_endpoint commands: - - curl -H "Content-Type: application/json" --data '{"docker_tag": "latest"}' -X POST $ENDPOINT + - apk add --no-cache curl + - curl -sO https://git.dotya.ml/wanderer/docker-archlinux-rf/raw/branch/master/curl.it + - ./curl.it $ENDPOINT --- @@ -56,13 +58,14 @@ trigger: steps: - name: call webhook pull: always - image: curlimages/curl:latest + image: bash:latest environment: ENDPOINT: from_secret: dockerhub_endpoint_nightly commands: - - - "curl -H 'Content-Type:application/json' --data '{\"docker_tag\":\"nightly\"}' -X POST $ENDPOINT" + - apk add --no-cache curl + - curl -sO https://git.dotya.ml/wanderer/docker-archlinux-rf/raw/branch/master/curl.it + - ./curl.it -n $ENDPOINT --- diff --git a/curl.it b/curl.it new file mode 100755 index 0000000..35dd195 --- /dev/null +++ b/curl.it @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ $# -lt 2 ]; then + curl -s -H 'Content-Type: application/json' --data '{"docker_tag":"nightly"}' -X POST $1 +else + curl -s -H 'Content-Type: application/json' --data '{"docker_tag":"latest"}' -X POST $2 +fi