metricator/.drone.yml
Stanislav N. aka pztrn 3ebb5b657c
All checks were successful
continuous-integration/drone/push Build is passing
Add ability to build tagged images.
2022-06-30 14:14:40 +05:00

44 lines
1005 B
YAML

---
kind: pipeline
type: docker
name: build
steps:
- name: lint
image: code.pztrn.name/containers/mirror/golangci/golangci-lint:v1.46.2
environment:
CGO_ENABLED: 0
commands:
- golangci-lint run
- name: test
image: code.pztrn.name/containers/mirror/golang:1.18.3-alpine
environment:
CGO_ENABLED: 0
commands:
- go test ./...
- name: build master image
image: code.pztrn.name/containers/mirror/plugins/docker:20.13.0
when:
branch: ["master"]
settings:
registry: code.pztrn.name
username: drone
password:
from_secret: drone_secret
repo: code.pztrn.name/apps/metricator
auto_tag: true
- name: build tagged image
image: code.pztrn.name/containers/mirror/plugins/docker:20.13.0
when:
event: ["tag"]
settings:
registry: code.pztrn.name
username: drone
password:
from_secret: drone_secret
repo: code.pztrn.name/apps/metricator
auto_tag: true