-
Notifications
You must be signed in to change notification settings - Fork 0
400 lines (358 loc) · 12.7 KB
/
Copy pathrelease-development.yml
File metadata and controls
400 lines (358 loc) · 12.7 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# Publishes :develop multi-arch images on push to develop, gated by
# per-image path filters. Stage pulls :develop; prod stays on :latest
# (release.yml). Mirrors release.yml's matrix-on-native-runners +
# manifest-list shape.
name: Release Development
on:
push:
branches:
- develop
# Only build the newest develop merge. A push that lands while a prior run is
# still building cancels that run, so rapid back-to-back merges don't fan out
# into N parallel multi-arch builds all pulling base images from Docker Hub
# (rate-limit avoidance). A superseded run's images would be immediately stale
# anyway, since the next merge's HEAD is what stage deploys.
concurrency:
group: release-development
cancel-in-progress: true
jobs:
# Per-image path filters. tripbot and vlc rebuild on any Go change to
# their respective code surfaces; obs only rebuilds when its Dockerfile
# context changes (the arm64 CEF compile is ~30 min, so skipping it on
# Go-only merges is the load-bearing reason this job exists).
changes:
runs-on: ubuntu-latest
outputs:
tripbot: ${{ steps.filter.outputs.tripbot }}
vlc: ${{ steps.filter.outputs.vlc }}
obs: ${{ steps.filter.outputs.obs }}
onscreens: ${{ steps.filter.outputs.onscreens }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
tripbot:
- 'cmd/tripbot/**'
- 'pkg/**'
- 'infra/docker/tripbot/**'
- 'go.mod'
- 'go.sum'
- '.dockerignore'
- '.github/workflows/release-development.yml'
vlc:
# The vlc container builds cmd/vlc-server, which transitively
# imports packages outside its own cmd/pkg tree — e.g. pkg/obs,
# pkg/instrumentation, pkg/telemetry, pkg/helpers. Match anything
# under pkg/** so a change to any shared package triggers a vlc
# rebuild — same shape as the tripbot filter above. Without this,
# edits like the 2026-05-28 pkg/obs detangle silently ship a stale
# vlc image because the narrow vlc-only globs don't match
# pkg/obs/**. (onscreens-server is now its own image — see the
# onscreens filter below.)
- 'cmd/vlc-server/**'
- 'pkg/**'
- 'infra/docker/vlc/**'
- 'go.mod'
- 'go.sum'
- '.dockerignore'
- '.github/workflows/release-development.yml'
obs:
- 'infra/docker/obs/**'
- '.github/workflows/release-development.yml'
onscreens:
# onscreens-server is a pure-Go binary that transitively imports
# shared packages (pkg/telemetry, pkg/instrumentation, pkg/helpers,
# pkg/httpmw, …), so match pkg/** like the tripbot/vlc filters
# rather than a narrow onscreens-only glob.
- 'cmd/onscreens-server/**'
- 'pkg/**'
- 'infra/docker/onscreens-server/**'
- 'go.mod'
- 'go.sum'
- '.dockerignore'
- '.github/workflows/release-development.yml'
tripbot-build:
needs: changes
if: needs.changes.outputs.tripbot == 'true'
name: tripbot-build (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Resolve develop version
id: ver
run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate tags
id: meta
uses: docker/metadata-action@v6
with:
images: adanalife/tripbot
flavor: |
latest=false
suffix=-${{ matrix.arch }}
tags: |
type=raw,value=develop
- name: Build & push
uses: docker/build-push-action@v7
with:
context: .
file: infra/docker/tripbot/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
build-args: |
VERSION=${{ steps.ver.outputs.value }}
SHA=${{ github.sha }}
cache-from: type=gha,scope=tripbot-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=tripbot-${{ matrix.arch }}
- name: Verify version stamping
run: |
IMAGE="adanalife/tripbot:develop-${{ matrix.arch }}"
.github/scripts/verify-stamped-image.sh "$IMAGE" \
"${{ steps.ver.outputs.value }}" "${{ github.sha }}"
tripbot-manifest:
needs: tripbot-build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create multi-arch manifest list
run: |
docker buildx imagetools create \
-t adanalife/tripbot:develop \
adanalife/tripbot:develop-amd64 \
adanalife/tripbot:develop-arm64
vlc-build:
needs: changes
if: needs.changes.outputs.vlc == 'true'
name: vlc-build (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Resolve develop version
id: ver
run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate tags
id: meta
uses: docker/metadata-action@v6
with:
images: adanalife/vlc
flavor: |
latest=false
suffix=-${{ matrix.arch }}
tags: |
type=raw,value=develop
- name: Build & push
uses: docker/build-push-action@v7
with:
context: .
file: infra/docker/vlc/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
build-args: |
VERSION=${{ steps.ver.outputs.value }}
SHA=${{ github.sha }}
cache-from: type=gha,scope=vlc-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=vlc-${{ matrix.arch }}
- name: Verify version stamping
run: |
IMAGE="adanalife/vlc:develop-${{ matrix.arch }}"
.github/scripts/verify-stamped-image.sh "$IMAGE" \
"${{ steps.ver.outputs.value }}" "${{ github.sha }}"
vlc-manifest:
needs: vlc-build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create multi-arch manifest list
run: |
docker buildx imagetools create \
-t adanalife/vlc:develop \
adanalife/vlc:develop-amd64 \
adanalife/vlc:develop-arm64
obs-build:
needs: changes
if: needs.changes.outputs.obs == 'true'
name: obs-build (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
dockerfile: infra/docker/obs/Dockerfile
- arch: arm64
runner: ubuntu-24.04-arm
dockerfile: infra/docker/obs/Dockerfile.arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Resolve develop version
id: ver
run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate tags
id: meta
uses: docker/metadata-action@v6
with:
images: adanalife/obs
flavor: |
latest=false
suffix=-${{ matrix.arch }}
tags: |
type=raw,value=develop
- name: Build & push
uses: docker/build-push-action@v7
with:
context: .
file: ${{ matrix.dockerfile }}
tags: ${{ steps.meta.outputs.tags }}
push: true
build-args: |
VERSION=${{ steps.ver.outputs.value }}
SHA=${{ github.sha }}
cache-from: type=gha,scope=obs-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=obs-${{ matrix.arch }}
- name: Verify version stamping
run: |
IMAGE="adanalife/obs:develop-${{ matrix.arch }}"
.github/scripts/verify-stamped-image.sh "$IMAGE" \
"${{ steps.ver.outputs.value }}" "${{ github.sha }}"
obs-manifest:
needs: obs-build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create multi-arch manifest list
run: |
docker buildx imagetools create \
-t adanalife/obs:develop \
adanalife/obs:develop-amd64 \
adanalife/obs:develop-arm64
onscreens-server-build:
needs: changes
if: needs.changes.outputs.onscreens == 'true'
name: onscreens-server-build (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Resolve develop version
id: ver
run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate tags
id: meta
uses: docker/metadata-action@v6
with:
images: adanalife/onscreens-server
flavor: |
latest=false
suffix=-${{ matrix.arch }}
tags: |
type=raw,value=develop
- name: Build & push
uses: docker/build-push-action@v7
with:
context: .
file: infra/docker/onscreens-server/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
build-args: |
VERSION=${{ steps.ver.outputs.value }}
SHA=${{ github.sha }}
cache-from: type=gha,scope=onscreens-server-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=onscreens-server-${{ matrix.arch }}
- name: Verify version stamping
run: |
IMAGE="adanalife/onscreens-server:develop-${{ matrix.arch }}"
.github/scripts/verify-stamped-image.sh "$IMAGE" \
"${{ steps.ver.outputs.value }}" "${{ github.sha }}"
onscreens-server-manifest:
needs: onscreens-server-build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create multi-arch manifest list
run: |
docker buildx imagetools create \
-t adanalife/onscreens-server:develop \
adanalife/onscreens-server:develop-amd64 \
adanalife/onscreens-server:develop-arm64