Skip to content

Commit

Permalink
ci: deploy by tag version
Browse files Browse the repository at this point in the history
  • Loading branch information
supanadit committed Mar 5, 2023
1 parent 292c190 commit b074a2d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@ jobs:
build:
docker:
- image: cimg/base:2022.05
auth:
username: supanadit
password: $DOCKER_HUB_PASS
steps:
- checkout
- setup_remote_docker
- run:
name: Build Docker image
command: |
docker build -t supanadit/todo:latest .
docker build -t supanadit/todo:${CIRCLE_TAG} -t supanadit/todo:latest .
- run:
name: Push Docker image
command: |
docker login -u supanadit -p $DOCKER_HUB_PASS
docker push supanadit/todo:${CIRCLE_TAG}
docker push supanadit/todo:latest
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
tags:
only: /^v\d+\.\d+(\.\d+)?(-\S*)?$/

0 comments on commit b074a2d

Please sign in to comment.