Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit bc84b6f

Browse files
committed
Add circle.yml
1 parent d5fd0a0 commit bc84b6f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

circle.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: docker:17.06.0-ce
6+
working_directory: ~/workdir
7+
steps:
8+
- run: apk add --no-cache git openssh-client
9+
- checkout
10+
- setup_remote_docker:
11+
version: 17.06.0-ce
12+
- run: docker build -t ${DOCKER_HUB_IMAGE} .
13+
- deploy:
14+
name: Deploy the image to Docker Hub
15+
command: |
16+
if echo -n "${CIRCLE_TAG}" | grep -Eq ^v[0-9]+\.[0-9]+\.[0-9]+$; then
17+
docker tag ${DOCKER_HUB_IMAGE} ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
18+
docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASS}
19+
docker push ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
20+
docker push ${DOCKER_HUB_IMAGE}
21+
fi
22+
23+
deployment:
24+
workaround_for_circleci_2_0:
25+
tag: /.*/

0 commit comments

Comments
 (0)