-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.woodpecker.yml
136 lines (125 loc) · 3.2 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
variables:
- &devcon 'ghcr.io/windsource/picus-devcontainer:1.0.1'
- &buildx_plugin 'woodpeckerci/plugin-docker-buildx:4.2.0'
labels:
platform: linux/amd64
clone:
git:
image: woodpeckerci/plugin-git:2.5.1
when:
- event: pull_request
- event: [push, tag, manual]
branch: main
steps:
- name: build-dev-container
image: *buildx_plugin
settings:
repo: ghcr.io/windsource/picus-devcontainer
dockerfile: .devcontainer/Dockerfile
context: .devcontainer
tags_file: .devcontainer/VERSION
logins:
- registry: https://ghcr.io
username:
from_secret: github_username
password:
from_secret: github_password
when:
path:
- ".devcontainer/*"
- ".woodpecker.yml"
event: [push, manual]
branch: main
# The license check has to before the vendor command as otherweise 'cargo install' will not work
- name: check-licenses
image: *devcon
commands:
- just check-licenses
when:
- event: pull_request
- event: [push, tag, manual]
branch: main
- name: vendor
image: *devcon
commands:
- just vendor
when:
- event: tag
- name: build-x86
image: *devcon
commands:
- just test
- just build-amd64
when:
- event: pull_request
- event: [push, tag, manual]
branch: main
- name: build-arm64
image: *devcon
commands:
- just build-arm64
when:
- event: pull_request
- event: [push, tag, manual]
branch: main
- name: checksum
image: *devcon
commands:
- just checksum
when:
- event: tag
- name: publish-distroless
image: *buildx_plugin
settings:
platforms: linux/amd64,linux/arm64
repo: windsource/picus,ghcr.io/windsource/picus
auto_tag: true
default_suffix: "distroless"
dockerfile: Dockerfile.distroless.multiarch
# dry_run: true
logins:
- registry: https://index.docker.io/v1/
username:
from_secret: docker_username
password:
from_secret: docker_password
- registry: https://ghcr.io
username:
from_secret: github_username
password:
from_secret: github_password
when:
event: [push, tag, manual]
branch: main
- name: publish-debian
image: *buildx_plugin
settings:
platforms: linux/amd64,linux/arm64
repo: windsource/picus,ghcr.io/windsource/picus
auto_tag: true
dockerfile: Dockerfile.multiarch
# dry_run: true
logins:
- registry: https://index.docker.io/v1/
username:
from_secret: docker_username
password:
from_secret: docker_password
- registry: https://ghcr.io
username:
from_secret: github_username
password:
from_secret: github_password
when:
event: [push, tag, manual]
branch: main
- name: publish-release
image: woodpeckerci/plugin-release:0.1.0
settings:
files:
- 'dist/*'
api_key:
from_secret: github_password
title: ${CI_COMMIT_TAG##v}
when:
- event: tag