mirror of
https://github.com/supanadit/todo.git
synced 2024-11-22 01:56:21 +00:00
ci: deploy by tag version
This commit is contained in:
parent
292c190606
commit
b074a2dbb6
@ -4,15 +4,27 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/base:2022.05
|
- image: cimg/base:2022.05
|
||||||
|
auth:
|
||||||
|
username: supanadit
|
||||||
|
password: $DOCKER_HUB_PASS
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker
|
- setup_remote_docker
|
||||||
- run:
|
- run:
|
||||||
name: Build Docker image
|
name: Build Docker image
|
||||||
command: |
|
command: |
|
||||||
docker build -t supanadit/todo:latest .
|
docker build -t supanadit/todo:${CIRCLE_TAG} -t supanadit/todo:latest .
|
||||||
- run:
|
- run:
|
||||||
name: Push Docker image
|
name: Push Docker image
|
||||||
command: |
|
command: |
|
||||||
docker login -u supanadit -p $DOCKER_HUB_PASS
|
docker push supanadit/todo:${CIRCLE_TAG}
|
||||||
docker push supanadit/todo:latest
|
docker push supanadit/todo:latest
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build-and-deploy:
|
||||||
|
jobs:
|
||||||
|
- build:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
Loading…
Reference in New Issue
Block a user