ezshare/.woodpecker.yml

33 lines
658 B
YAML
Raw Normal View History

2022-01-03 18:41:01 +00:00
pipeline:
build:
2022-01-03 19:12:10 +00:00
image: golang:${GO_VERSION}
2022-01-03 18:41:01 +00:00
commands:
2022-01-03 18:43:36 +00:00
- go build main.go
- go test -v ./...
2022-01-03 19:47:05 +00:00
when:
branch: master
event: [push, pull_request, tag, deployment]
2022-01-03 19:12:10 +00:00
2022-01-05 00:08:20 +00:00
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:
2022-01-05 00:23:13 +00:00
tag: v*
2022-01-05 00:08:20 +00:00
2022-01-03 19:12:10 +00:00
matrix:
GO_VERSION:
- "1.17"
- "latest"