-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.travis.yml
22 lines (22 loc) · 1.47 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
dist: trusty
sudo: required
language: generic
services:
- docker
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
env:
global:
- secure: "dGgxb/IybrMFnAF1osj9dYOfKP5Z7dK8IQRG/NYY/lQh4HWRZuGobl/uBlECUA5qkUc7SAUXVz6wLTJOjwH9yz2Hu/Rcxvg3AqUGE4DRhaZKs2dsRKB05/j3K5PV/mAtdPOIz17EDmCVgRXEgg/DzsfXFYtGbKLcSke8giUK482bm5tjXIyj/6DaG+L96RZtHcv6ee2PC98W3XFbjjPw5lixJb3cW05qzHGW2oA4uCA67Z0LnyWLSykVljjIEEm1siChCKxmBKDTutXu1OwfPMuOk5qr+KZW57DMwM0YhRerFPQW6esoGFA8LQkoi4H8mkFrZy85wPfP5HN5n9ijWKLWBJ5fUZJ6Xa9yE2e6pnmm8rACXDMlR+KhXNKHM6NaW2S/ZF9DEfbZe4nIMnNtzbsqp1TM7mZFHRNDn7pTUBYs5GqD0CNDoWjr1Qtg+VCv0vqS+cWI7G4ubct1PqpzP4XDLtP+e3HQLu39TKaL1FSinGxQkWZymYhtUeW0tBYpfG7irCPE6jz4aUg2dlnCGFgdjLRGEUFLiDJ2ZETEV+9X4Yner5K7QHwdtB5LcjyNLLkfdGqFGDBYYLhaOaeS01ssCTy2t9/hdYL0UPftH5H3647Nn0/AaIJY4hAXcSIT0cDoNAjRc7HyWTwueKaG2vEdUYELOdqbx90QgwWSnc4=" # DOCKER_PASS
- COMMIT=${TRAVIS_COMMIT::8}
- REPO=alexhaslehurst/server-side-gameboy
script:
- docker build -t $REPO:$COMMIT .
after_success:
- echo $DOCKER_PASS | docker login --username alexhaslehurst --password-stdin
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi
- docker push $REPO