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