todo/.circleci/config.yml

31 lines
685 B
YAML
Raw Normal View History

2023-03-05 13:37:00 +00:00
version: 2
2023-03-05 13:27:40 +00:00
jobs:
build:
docker:
- image: cimg/base:2022.05
2023-03-05 13:43:00 +00:00
auth:
username: supanadit
password: $DOCKER_HUB_PASS
2023-03-05 13:37:00 +00:00
steps:
- checkout
- setup_remote_docker
- run:
name: Build Docker image
command: |
2023-03-05 13:43:00 +00:00
docker build -t supanadit/todo:${CIRCLE_TAG} -t supanadit/todo:latest .
2023-03-05 13:37:00 +00:00
- run:
name: Push Docker image
command: |
2023-03-05 13:43:00 +00:00
docker push supanadit/todo:${CIRCLE_TAG}
2023-03-05 13:37:00 +00:00
docker push supanadit/todo:latest
2023-03-05 13:43:00 +00:00
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
tags:
only: /^v\d+\.\d+(\.\d+)?(-\S*)?$/