goveal/.drone.yml

109 lines
2.1 KiB
YAML
Raw Normal View History

2023-02-28 20:12:24 +00:00
---
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: arm64
2023-02-28 20:12:24 +00:00
trigger:
2023-07-18 19:39:26 +00:00
branch:
- main
2023-02-28 20:12:24 +00:00
event:
- push
- pull_request
- tag
steps:
- name: Lint
image: docker.io/golangci/golangci-lint:latest
environment:
GO111MODULE: "on"
CGO_ENABLED: "0"
GOMEMLIMIT: "1150MiB"
2023-02-28 21:07:33 +00:00
volumes:
- name: go-cache
path: /go
2023-02-28 20:12:24 +00:00
commands:
- golangci-lint run -v
- name: Test
image: docker.io/golang:1.20-bullseye
2023-02-28 20:32:41 +00:00
network_mode: host
2023-02-28 20:12:24 +00:00
environment:
GO111MODULE: "on"
CGO_ENABLED: "1"
2023-02-28 21:07:33 +00:00
volumes:
- name: go-cache
path: /go
2023-02-28 20:12:24 +00:00
commands:
- go install gotest.tools/gotestsum@latest
- sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
- task test
2023-02-28 20:32:41 +00:00
- name: Snapshot release
image: ghcr.io/goreleaser/goreleaser
when:
event:
- push
- pull_request
volumes:
- name: go-cache
path: /go
commands:
- goreleaser release --clean --snapshot
- name: Release
image: ghcr.io/goreleaser/goreleaser
when:
event:
- tag
volumes:
- name: go-cache
path: /go
commands:
2023-03-01 20:46:23 +00:00
- apk add -U --no-cache git-lfs
- git lfs install
2023-03-01 20:17:08 +00:00
- git fetch --tags
2023-03-01 20:46:23 +00:00
- git lfs pull
- docker login -u prskr -p "$${GITEA_TOKEN}" code.icb4dc0.de
2023-02-28 20:32:41 +00:00
- goreleaser release --clean
2023-03-01 19:10:36 +00:00
environment:
GITEA_TOKEN:
from_secret: gitea_token
2023-03-01 20:46:23 +00:00
network_mode: host
2023-02-28 20:32:41 +00:00
2023-02-28 21:07:33 +00:00
volumes:
- name: go-cache
temp: { }
2023-02-28 20:12:24 +00:00
---
kind: pipeline
type: docker
name: housekeeping
platform:
os: linux
arch: arm64
2023-02-28 20:12:24 +00:00
trigger:
event:
- cron
cron:
- housekeeping
steps:
- name: Renovate
image: code.icb4dc0.de/prskr/ci-images/renovate:latest
commands:
- renovate "${DRONE_REPO}"
environment:
RENOVATE_TOKEN:
from_secret: gitea_token
GITHUB_COM_TOKEN:
from_secret: github_token
RENOVATE_PLATFORM: gitea
RENOVATE_AUTODISCOVER: "false"
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
LOG_LEVEL: info