-
Notifications
You must be signed in to change notification settings - Fork 34
/
.woodpecker.yml
45 lines (41 loc) · 1.08 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
# This pipeline uses the https://woodpecker-ci.org/plugins/Docker%20Buildx plugin
variables:
- &repo 'docker.io/devture/exim-relay'
- &dockerfile 'Dockerfile'
- &platforms 'linux/amd64,linux/arm64/v8,linux/arm/v7'
- &builder_image woodpeckerci/plugin-docker-buildx:5.0.0
services:
docker:
image: docker:27.1.1-dind
commands:
- dockerd --tls=false --host=tcp://0.0.0.0:2376
privileged: true
steps:
- name: build-and-push-for-branch
when:
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
- event: manual
image: *builder_image
settings:
repo: *repo
username:
from_secret: docker_username
password:
from_secret: docker_password
tag: latest
dockerfile: *dockerfile
platforms: *platforms
- name: build-and-push-for-tag
when:
- event: tag
image: *builder_image
settings:
repo: *repo
username:
from_secret: docker_username
password:
from_secret: docker_password
tag: ${CI_COMMIT_TAG}
dockerfile: *dockerfile
platforms: *platforms