Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 574 Bytes
sudo: required
services:
- docker
before_install:
- sudo apt-get install -y curl
- sudo apt-get install -y jq
script:
- sed -i "s_FROM.*_FROM rubybench/ruby:$(curl -s -S "https://registry.hub.docker.com/v2/repositories/rubybench/ruby/tags/" | jq '."results"[]["name"]'| sed -n 1p |cut -c2-8)_" ./Dockerfile
- docker tag $(docker build . | tail -n 1 | cut -d' ' -f 3) $rubybench/ruby:$(git ls-remote https://github.com/tgxworld/ruby trunk | cut -c1-7)
- docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD
- docker push rubybench/ruby