todo/.circleci/config.yml

34 lines
769 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:52:37 +00:00
docker login -u supanadit -p $DOCKER_HUB_PASS
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
2023-03-05 13:44:41 +00:00
main:
2023-03-05 13:43:00 +00:00
jobs:
- build:
filters:
2023-03-05 13:47:26 +00:00
branches:
ignore: /.*/
2023-03-05 13:43:00 +00:00
tags:
2023-03-05 13:44:41 +00:00
only: /^\d+\.\d+\.\d+$/