ezshare/.woodpecker.yml

49 lines
1.0 KiB
YAML
Raw Permalink Normal View History

2022-01-13 17:37:39 +00:00
pipeline:
test:
2022-01-13 17:49:53 +00:00
image: golang:latest
2022-01-13 17:37:39 +00:00
commands:
- go build main.go
- go test -v ./...
- go vet ./...
when:
branch: master
event: [push, pull_request, tag, deployment]
image-latest:
image: plugins/docker
settings:
2022-01-13 17:44:33 +00:00
repo: registry.t-juice.club/ezshare
2022-01-13 17:37:39 +00:00
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:
2022-01-13 17:44:33 +00:00
repo: registry.t-juice.club/ezshare
2022-01-13 17:37:39 +00:00
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]