gpaste/.woodpecker.yml
Torjus Håkestad 12e9c72463
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
More detailed coverage in pipeline
2022-02-01 06:52:20 +01:00

58 lines
1.3 KiB
YAML

pipeline:
test:
image: golang:latest
commands:
- go build -o gpaste-client ./cmd/client/client.go
- go build -o gpaste-server ./cmd/server/server.go
- go test -cover -coverprofile="/tmp/cover.out" ./...
- go tool cover func="/tmp/cover.out"
- go vet ./...
when:
branch: master
event: [push, pull_request, tag, deployment]
lint:
image: golangci/golangci-lint:v1.43.0
commands:
- golangci-lint run
when:
event: [push, pull_request]
image-latest:
image: plugins/docker
settings:
repo: registry.t-juice.club/gpaste
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- latest
- "${CI_COMMIT_SHA:0:8}"
when:
branch: master
event: push
image-tagged:
image: plugins/docker
settings:
repo: registry.t-juice.club/gpaste
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- "${CI_COMMIT_TAG}"
when:
event: [tag]
goreleaser-tagged:
image: goreleaser/goreleaser
commands:
- git fetch --tags
- echo "$GITEA_TOKEN" > gitea_token
- goreleaser release
when:
event: [tag]
secrets: [gitea_token]