fastpastebin/.drone.yml
Stanislav N. aka pztrn 9164c53c54
Some checks failed
continuous-integration/drone/push Build is failing
Force docker plugin version.
2022-06-28 21:38:09 +05:00

56 lines
1.2 KiB
YAML

---
kind: pipeline
type: docker
name: lint and test
steps:
- name: lint
image: code.pztrn.name/containers/mirror/golangci/golangci-lint:v1.46.2
pull: if-not-exists
environment:
CGO_ENABLED: 0
commands:
- golangci-lint run
- name: test
image: code.pztrn.name/containers/mirror/golang:1.18.3-alpine
pull: if-not-exists
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: 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/fastpastebin
auto_tag: true
- name: build tagged image
image: code.pztrn.name/containers/mirror/plugins/docker:20.13.0
pull: if-not-exists
when:
event: ["tag"]
settings:
registry: code.pztrn.name
username: drone
password:
from_secret: drone_secret
repo: code.pztrn.name/apps/fastpastebin
auto_tag: true