fastpastebin/.drone.yml
Stanislav N. aka pztrn 1cb93c7d97
All checks were successful
continuous-integration/drone/push Build is passing
Update Drone configuration.
2022-06-26 22:49:37 +05:00

56 lines
1.0 KiB
YAML

---
kind: pipeline
type: docker
name: lint and test
steps:
- name: lint
image: golangci/golangci-lint:v1.46.2
pull: if-not-exists
environment:
CGO_ENABLED: 0
commands:
- golangci-lint run
- name: test
image: 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: plugins/docker
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: plugins/docker
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