]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:construction_worker: Trigger Docker images build on Travis (#65)
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 4 Mar 2019 07:12:21 +0000 (11:12 +0400)
committerGitHub <noreply@github.com>
Mon, 4 Mar 2019 07:12:21 +0000 (11:12 +0400)
.travis.yml
scripts/trigger-docker.sh [new file with mode: 0755]

index a6dc5a67559ccaa2a4f134bc8e1f3ae567b5594a..3789a151caa7e8cf4243ad00d870fef79b57eb78 100644 (file)
@@ -15,3 +15,9 @@ script:
 
 after_script:
     - bash <(curl -s https://codecov.io/bash)
+
+deploy:
+  provider: script
+  script: bash scripts/trigger-docker.sh
+#   on:
+#     branch: master
diff --git a/scripts/trigger-docker.sh b/scripts/trigger-docker.sh
new file mode 100755 (executable)
index 0000000..660b1a1
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+set -x
+
+body='{
+"request": {
+"branch":"master"
+}}'
+
+curl -s -X POST \
+   -H "Content-Type: application/json" \
+   -H "Accept: application/json" \
+   -H "Travis-API-Version: 3" \
+   -H "Authorization: token $TRAVIS_TOKEN" \
+   -d "$body" \
+   https://api.travis-ci.org/repo/tiangolo%2Fuvicorn-gunicorn-fastapi-docker/requests