-
Notifications
You must be signed in to change notification settings - Fork 4
151 lines (136 loc) · 5.43 KB
/
ci.yaml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BASE_IMAGE: haproxy:2.9-bookworm
REGISTRY_IMAGE_HAPROXY_ACME: localhost:5000/flobernd/haproxy-acme
REGISTRY_IMAGE_HAPROXY_ACME_HTTP01: localhost:5000/flobernd/haproxy-acme-http01
REGISTRY_IMAGE_HAPROXY_ACME_DNS01: localhost:5000/flobernd/haproxy-acme-dns01
REGISTRY_IMAGE_HAPROXY_ACME_TLSALPN01: localhost:5000/flobernd/haproxy-acme-tlsalpn01
jobs:
build:
name: CI
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Extract metadata for 'haproxy-acme'
id: meta-haproxy-acme
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE_HAPROXY_ACME }}
# flavor: |
# latest=false
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
- name: Build 'haproxy-acme'
id: build-haproxy-acme
uses: docker/build-push-action@v5
with:
context: ./haproxy-acme/data
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
# platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
tags: ${{ steps.meta-haproxy-acme.outputs.tags }}
labels: ${{ steps.meta-haproxy-acme.outputs.labels }}
annotations: ${{ steps.meta-haproxy-acme.outputs.annotations }}
- name: Extract metadata for 'haproxy-acme-http01'
id: meta-haproxy-acme-http01
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE_HAPROXY_ACME_HTTP01 }}
# flavor: |
# latest=false
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
- name: Build 'haproxy-acme-http01'
id: build-haproxy-acme-http01
uses: docker/build-push-action@v5
with:
context: ./haproxy-acme-http01/data
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
# platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x
build-args: |
BASE_IMAGE=${{ fromJSON(steps.build-haproxy-acme.outputs.metadata)['image.name'] }}
tags: ${{ steps.meta-haproxy-acme-http01.outputs.tags }}
labels: ${{ steps.meta-haproxy-acme-http01.outputs.labels }}
annotations: ${{ steps.meta-haproxy-acme-http01.outputs.annotations }}
- name: Extract metadata for 'haproxy-acme-dns01'
id: meta-haproxy-acme-dns01
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE_HAPROXY_ACME_DNS01 }}
# flavor: |
# latest=false
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
- name: Build 'haproxy-acme-dns01'
id: build-haproxy-acme-dns01
uses: docker/build-push-action@v5
with:
context: ./haproxy-acme-dns01/data
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
# platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x
build-args: |
BASE_IMAGE=${{ fromJSON(steps.build-haproxy-acme.outputs.metadata)['image.name'] }}
tags: ${{ steps.meta-haproxy-acme-dns01.outputs.tags }}
labels: ${{ steps.meta-haproxy-acme-dns01.outputs.labels }}
annotations: ${{ steps.meta-haproxy-acme-dns01.outputs.annotations }}
- name: Extract metadata for 'haproxy-acme-tlsalpn01'
id: meta-haproxy-acme-tlsalpn01
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE_HAPROXY_ACME_TLSALPN01 }}
# flavor: |
# latest=false
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
- name: Build 'haproxy-acme-tlsalpn01'
id: build-haproxy-acme-tlsalpn01
uses: docker/build-push-action@v5
with:
context: ./haproxy-acme-tlsalpn01/data
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
# platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x
build-args: |
BASE_IMAGE=${{ fromJSON(steps.build-haproxy-acme.outputs.metadata)['image.name'] }}
tags: ${{ steps.meta-haproxy-acme-tlsalpn01.outputs.tags }}
labels: ${{ steps.meta-haproxy-acme-tlsalpn01.outputs.labels }}
annotations: ${{ steps.meta-haproxy-acme-tlsalpn01.outputs.annotations }}