From 8084db64038b7f7a557ad498a341e9b73eccbb4f Mon Sep 17 00:00:00 2001 From: Naoki Kosaka Date: Sun, 28 Jul 2019 19:47:59 +0900 Subject: [PATCH] Create commit based docker image. --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b925ff3..c24a92e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,12 +24,14 @@ jobs: name: build docker image command: | docker build -t ${DOCKER_USER}/activity-relay:edge . + docker tag ${DOCKER_USER}/activity-relay:edge ${DOCKER_USER}/activity-relay:$(echo ${CIRCLE_SHA1}|head -c7) - run: name: upload image to docker hub. command: | docker login --username=${DOCKER_USER} --password=${DOCKER_PASS} docker push ${DOCKER_USER}/activity-relay:edge - + docker push ${DOCKER_USER}/activity-relay:$(echo ${CIRCLE_SHA1}|head -c7) + workflows: version: 2 build: