mirror of
https://github.com/mashirozx/docker-php-nginx.git
synced 2024-11-26 00:38:13 +08:00
16 lines
408 B
YAML
16 lines
408 B
YAML
services:
|
|
- docker
|
|
|
|
env:
|
|
global:
|
|
- COMMIT=${TRAVIS_COMMIT::8}
|
|
- REPO=trafex/php-nginx
|
|
|
|
script:
|
|
- docker --version
|
|
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
|
|
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
|
- docker build -t $REPO:$COMMIT .
|
|
- docker tag $REPO:$COMMIT $REPO:$TAG
|
|
- docker push $REPO
|