peckertest/.woodpecker.yml

47 lines
1003 B
YAML
Raw Normal View History

2022-01-10 12:02:45 +00:00
pipeline:
2022-01-10 12:19:48 +00:00
test_short:
image: golang:latest
commands:
- go build main.go
- go test -v ./...
when:
2022-01-10 12:21:15 +00:00
event: [pull_request, push]
2022-01-10 12:19:48 +00:00
2022-01-13 10:07:03 +00:00
image-latest:
2022-01-10 12:02:45 +00:00
image: plugins/docker
settings:
repo: registry.t-juice.club/peckertest
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- latest
- "${CI_COMMIT_SHA:0:8}"
when:
branch: master
event: push
2022-01-13 10:07:03 +00:00
image-tagged:
2022-01-10 12:02:45 +00:00
image: plugins/docker
settings:
repo: registry.t-juice.club/peckertest
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- "${CI_COMMIT_TAG}"
when:
event: [tag]
2022-01-13 10:07:03 +00:00
goreleaser-tagged:
image: goreleaser/goreleaser
commands:
2022-01-13 10:28:40 +00:00
- git fetch --tags
2022-01-13 10:07:03 +00:00
- echo "$GITEA_TOKEN" > gitea_token
- goreleaser release
when:
2022-01-13 10:09:37 +00:00
event: [tag]
2022-01-13 10:16:34 +00:00
secrets: [gitea_token]