From 8ed1b575d9cf02f46f6a46aaf0abc3a84cdc674a Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 30 Oct 2018 10:48:23 +0000 Subject: [PATCH] Enable CI builds on tags So that creating a GitHub release triggers an appropriately versioned build. --- .circleci/config.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 217f3fa..a1aca2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,12 +9,21 @@ jobs: - setup_remote_docker - run: go get github.com/golang/dep/cmd/dep - run: dep ensure - - run: make - - deploy: - name: Maybe push master images + name: Build and push image command: | - if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then - docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io - make publish-image + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io + if [ -z "${CIRCLE_TAG}" ]; then + make publish-image + else + make VERSION="${CIRCLE_TAG}" publish-image fi + +workflows: + version: 2 + build: + jobs: + - build: + filters: + tags: + only: /.*/