Marvin Steadfast
71aa7282b5
All checks were successful
continuous-integration/drone/push Build is passing
81 lines
1.4 KiB
YAML
81 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
steps:
|
|
- name: tags
|
|
image: alpine/git
|
|
commands:
|
|
- git fetch --tags
|
|
|
|
- name: lint
|
|
image: golangci/golangci-lint:v1.39.0
|
|
commands:
|
|
- make install-tools
|
|
- make lint
|
|
depends_on:
|
|
- tags
|
|
|
|
- name: test
|
|
image: golang:latest
|
|
commands:
|
|
- make test
|
|
depends_on:
|
|
- tags
|
|
|
|
- name: build
|
|
image: goreleaser/goreleaser:v0.162.0
|
|
commands:
|
|
- make build
|
|
depends_on:
|
|
- tags
|
|
- lint
|
|
- test
|
|
when:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
- name: release
|
|
image: goreleaser/goreleaser:v0.162.0
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
DOCKER_USERNAME:
|
|
from_secret: docker_username
|
|
DOCKER_PASSWORD:
|
|
from_secret: github_token
|
|
DOCKER_REGISTRY: ghcr.io
|
|
commands:
|
|
- sleep 5
|
|
- >
|
|
echo $DOCKER_PASSWORD |
|
|
docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin
|
|
- goreleaser release --rm-dist
|
|
depends_on:
|
|
- tags
|
|
- lint
|
|
- test
|
|
- docker
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|