ezshare/.woodpecker.yml
2022-01-05 01:23:13 +01:00

33 lines
658 B
YAML

pipeline:
build:
image: golang:${GO_VERSION}
commands:
- go build main.go
- go test -v ./...
when:
branch: master
event: [push, pull_request, tag, deployment]
tag:
image: alpine:latest
commands:
- cat ezshare/version.go |grep Vers|cut -d "=" -f2 | tr -d " v\""|xargs echo "latest,"|tr -d " " > .tags
- cat .tags
when:
status: [success]
publish:
image: plugins/docker
settings:
repo: registry.t-juice.club/ezshare
username: woodpecker
password:
from_secret: registrypassword
when:
tag: v*
matrix:
GO_VERSION:
- "1.17"
- "latest"