ddns/.circleci/config.yml

56 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2021-02-20 15:40:48 +01:00
version: 2.1
orbs:
docker: circleci/docker@1.5.0
2021-02-20 13:49:29 +01:00
jobs:
2021-02-20 15:40:48 +01:00
test:
2021-02-20 13:49:29 +01:00
docker:
2021-02-20 14:06:35 +01:00
- image: circleci/golang:1.16
2021-02-20 13:51:22 +01:00
working_directory: /go/src/github.com/pboehm/ddns
2021-02-20 13:49:29 +01:00
steps:
- checkout
- run: go get -v -t -d ./...
- run: go test -v ./...
2021-02-20 16:37:33 +01:00
docker-build:
executor: docker/docker
steps:
- setup_remote_docker
- checkout
- docker/build:
image: pboehm/ddns
dockerfile: docker/ddns/Dockerfile
2021-02-20 15:40:48 +01:00
2021-02-20 16:37:33 +01:00
docker-build-and-push:
2021-02-20 15:40:48 +01:00
executor: docker/docker
steps:
- setup_remote_docker
- checkout
- docker/check
- docker/build:
image: pboehm/ddns
2021-02-20 16:11:01 +01:00
dockerfile: docker/ddns/Dockerfile
2021-02-20 15:40:48 +01:00
- docker/push:
image: pboehm/ddns
2021-02-20 16:37:33 +01:00
tag: $CIRCLE_SHA1,latest
2021-02-20 15:40:48 +01:00
workflows:
commit:
jobs:
2021-02-20 16:37:33 +01:00
- test:
filters: # required since `docker-XXXX` have tag filters AND require `test`
tags:
only: /.*/
- docker-build:
requires:
- test
filters:
branches:
ignore: master
- docker-build-and-push:
requires:
- test
filters:
branches:
only: master