fastpastebin/.drone.yml

53 lines
966 B
YAML

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