forked from woodpecker-ci/plugin-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
84 lines (75 loc) · 1.94 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
variables:
- &golang 'golang:1.18-alpine'
pipeline:
version:
group: prepare
image: *golang
commands:
- apk add make
- make version
vendor:
group: prepare
image: *golang
commands:
- go mod vendor
lint:
group: test
image: *golang
commands:
- apk add make
- make vet
- make formatcheck
test:
group: test
image: *golang
commands:
- apk add make git-lfs
- make test
build-dryrun:
image: woodpeckerci/plugin-docker-buildx:latest
settings:
repo: woodpeckerci/plugin-git
dockerfile: ./docker/Dockerfile.multiarch
dry_run: true
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x
tags: latest
when:
event: pull_request
release-next:
image: woodpeckerci/plugin-docker-buildx:latest
settings:
repo: woodpeckerci/plugin-git
dockerfile: ./docker/Dockerfile.multiarch
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x
tags: next
secrets: [docker_username, docker_password]
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
release-tag:
image: woodpeckerci/plugin-docker-buildx:latest
settings:
repo: woodpeckerci/plugin-git
dockerfile: ./docker/Dockerfile.multiarch
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x
tags: [latest, "${CI_COMMIT_TAG}"]
secrets: [docker_username, docker_password]
when:
event: tag
build-binarys:
image: *golang
commands:
- apk add make
- make release
when:
event: tag
release-binarys:
image: plugins/github-release
settings:
files:
- release/*
title: ${CI_COMMIT_TAG##v}
api_key:
from_secret: github_token
when:
event: tag