diff --git a/.circleci/config.yml b/.circleci/config.yml index 69886e1..82fa415 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: paths: - product-api-go - release: + publish-docker-release: docker: - image: circleci/golang:1.13 environment: @@ -42,12 +42,12 @@ jobs: - run: name: docker push command: | - docker push hashicorpdemoapp/product-api:${CIRCLE_TAG} . + docker push hashicorpdemoapp/product-api:${CIRCLE_TAG} publish-github-release: docker: - image: cibuilds/github:0.10 - working_directory: ~/go/src/github.com/hashicorpdemoapp/product-api + working_directory: ~/go/src/github.com/hashicorpdemoapp/product-api-go steps: - attach_workspace: at: ~/go/src/github.com/hashicorpdemoapp @@ -64,7 +64,7 @@ workflows: filters: tags: only: /.*/ - - release: + - publish-docker-release: requires: - build-go filters: diff --git a/README.md b/README.md index 361e907..fc11727 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # product-api-go + +[![CircleCI](https://circleci.com/gh/hashicorp-demoapp/product-api-go.svg?style=svg)](https://circleci.com/gh/hashicorp-demoapp/product-api-go) + Products API written in Go + +## Release process +Pushing a new tag to Github will trigger a release on CircleCI \ No newline at end of file diff --git a/config/config.go b/config/config.go index ecf176c..202b103 100644 --- a/config/config.go +++ b/config/config.go @@ -82,6 +82,7 @@ func (f *File) watch(filepath string) { err := f.loadData() if err != nil { log.Println("error", err) + return } if f.updated != nil {