forked from VATUSA/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (26 loc) · 861 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
language: php
php:
- '7.1'
sudo: required
env:
- DOCKER_COMPOSE_VERSION=1.17.1
services:
- docker
before_script:
- cp .env.travis .env
before_install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname
-s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
script:
- docker-compose build --no-cache
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ];
then docker tag vatusa/api vatusa/api:latest;
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; docker push vatusa/api:latest;
fi
- if [ "$TRAVIS_BRANCH" == "dev" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ];
then docker tag vatusa/api vatusa/api:devel;
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; docker push vatusa/api:devel;
fi