File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 27
27
- RELEASE_TESTING=0
28
28
- COVERAGE=1
29
29
- DOCKER_IMAGE_NAME=metacpan-grep-front-end
30
+ # only deploy on the upstream repo
31
+ - DEPLOY_REPO_SLUG=metacpan/metacpan-grep-front-end
30
32
# matrix:
31
33
32
34
before_install :
Original file line number Diff line number Diff line change 2
2
3
3
DEPLOY_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
4
4
5
+ if [[ " x${DEPLOY_REPO_SLUG} " != " x${TRAVIS_REPO_SLUG} " ]]; then
6
+ echo " skip push.sh: only deploy on ${DEPLOY_REPO_SLUG} repo." ;
7
+ exit ;
8
+ fi
9
+
10
+ if [[ " x$DOCKER_HUB_USER " == " x" ]]; then
11
+ echo " DOCKER_HUB_USER env is not defined." ;
12
+ exit 1;
13
+ fi
14
+
15
+ if [[ " x$DOCKER_HUB_PASSWD " == " x" ]]; then
16
+ echo " DOCKER_HUB_PASSWD env is not defined." ;
17
+ exit 1;
18
+ fi
19
+
5
20
source " ${DEPLOY_DIR} /vars.sh"
6
21
7
22
cd " ${DEPLOY_DIR} /.."
8
23
9
24
docker login -u " $DOCKER_HUB_USER " -p " $DOCKER_HUB_PASSWD "
10
-
11
25
docker push " $DOCKER_HUB_NAME "
You can’t perform that action at this time.
0 commit comments