File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
3
- ' 6.9'
4
+ services :
5
+ - docker
4
6
branches :
5
7
only :
6
8
- master
7
9
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
8
10
before_deploy : " npm run build-core"
11
+ env :
12
+ - DOCKER_IMAGE_NAME=swaggerapi/swagger-ui
9
13
deploy :
10
14
provider : npm
11
15
email : apiteam@swagger.io
@@ -16,3 +20,13 @@ deploy:
16
20
tags : true
17
21
repo : swagger-api/swagger-ui
18
22
node : ' 6.9'
23
+ after_success :
24
+ - if [ $DOCKER_HUB_USERNAME ]; then
25
+ docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD;
26
+ docker build -t $DOCKER_IMAGE_NAME .;
27
+ if [ "$TRAVIS_TAG" != "master" && -z "$TRAVIS_TAG"]; then
28
+ docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:$TRAVIS_TAG;
29
+ fi;
30
+
31
+ docker push $DOCKER_IMAGE_NAME;
32
+ fi;
You can’t perform that action at this time.
0 commit comments