Add Docker Hub image builds

This commit is contained in:
Eugene Zbiranik
2019-01-29 15:11:11 +03:00
parent 0161509b5f
commit 98bfb82787
7 changed files with 161 additions and 152 deletions

View File

@@ -1,15 +1,9 @@
language: go
sudo: false
go:
- 1.11.x
- 1.x
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
- $HOME/Library/Caches/go-build
os:
- linux
- osx
@@ -21,6 +15,12 @@ before_install:
install:
- npm --prefix client install
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
- $HOME/Library/Caches/go-build
script:
- node -v
- npm -v
@@ -31,4 +31,53 @@ script:
- make
after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
matrix:
include:
# Release build configuration
- name: release
go:
- 1.11.x
os:
- linux
script:
- node -v
- npm -v
# Run tests just in case
- go test -race -v -bench=. ./...
# Prepare releases
- ./release.sh
- ls -l dist
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- dist/AdGuardHome_*
on:
repo: AdguardTeam/AdGuardHome
tags: true
draft: true
file_glob: true
skip_cleanup: true
- name: docker
if: type != pull_request AND (branch = master OR tag = true)
go:
- 1.11.x
os:
- linux
services:
- docker
before_script:
- nvm install node
- npm install -g npm
script:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
- ./build_docker.sh
after_script:
- docker images