grafana-backuper/.drone.yml
Tom Neuber 6f445cd7ee
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Add Dockerfile & build pipeline
2024-02-16 23:03:47 +01:00

73 lines
1.3 KiB
YAML

kind: pipeline
name: build
steps:
- name: gofmt
image: golang:1.21.5
commands:
- gofmt -l -s .
when:
event:
- push
- name: vuln-check
image: golang:1.21.5
commands:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
when:
event:
- push
- name: docker
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/grafana-backuper
tags:
- latest
- ${DRONE_BUILD_NUMBER}
platforms:
- linux/arm64
- linux/amd64
when:
branch:
- main
event:
- push
depends_on:
- gofmt
- vuln-check
- name: docker-build
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/grafana-backuper
tags:
- latest
- ${DRONE_BUILD_NUMBER}
platforms:
- linux/arm64
- linux/amd64
dry_run: true
when:
branch:
exclude:
- main
event:
- push
depends_on:
- gofmt
- vuln-check
when:
event:
exclude:
- pull_request