mirror of
https://github.com/supanadit/todo.git
synced 2024-11-10 01:42:20 +00:00
31 lines
685 B
YAML
31 lines
685 B
YAML
version: 2
|
|
|
|
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:${CIRCLE_TAG} -t supanadit/todo:latest .
|
|
- run:
|
|
name: Push Docker image
|
|
command: |
|
|
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*)?$/
|