@@ -3,7 +3,7 @@ name: Build
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - tchap
7
7
- " release/**"
8
8
tags :
9
9
- " v*"
22
22
CARGO_NET_GIT_FETCH_WITH_CLI : " true"
23
23
SCCACHE_GHA_ENABLED : " true"
24
24
RUSTC_WRAPPER : " sccache"
25
- IMAGE : ghcr.io/element-hq/matrix-authentication-service
26
- BUILDCACHE : ghcr.io/element-hq/matrix-authentication-service/buildcache
25
+ IMAGE : ghcr.io/tchapgouv/matrix-authentication-service
26
+ IMAGE_SYN2MAS : ghcr.io/tchapgouv/matrix-authentication-service/syn2mas
27
+ BUILDCACHE : ghcr.io/tchapgouv/matrix-authentication-service/buildcache
27
28
DOCKER_METADATA_ANNOTATIONS_LEVELS : manifest,index
28
29
29
30
jobs :
@@ -252,8 +253,24 @@ jobs:
252
253
type=semver,pattern={{major}}
253
254
type=sha
254
255
256
+ - name : Docker meta (syn2mas)
257
+ id : meta-syn2mas
258
+
259
+ with :
260
+ images : " ${{ env.IMAGE_SYN2MAS }}"
261
+ bake-target : docker-metadata-action-syn2mas
262
+ flavor : |
263
+ latest=auto
264
+ tags : |
265
+ type=ref,event=branch
266
+ type=ref,event=pr
267
+ type=semver,pattern={{version}}
268
+ type=semver,pattern={{major}}.{{minor}}
269
+ type=semver,pattern={{major}}
270
+ type=sha
271
+
255
272
- name : Setup Cosign
256
- uses :
sigstore/[email protected] .2
273
+ uses :
sigstore/[email protected] .1
257
274
258
275
- name : Set up Docker Buildx
259
276
@@ -271,12 +288,13 @@ jobs:
271
288
272
289
- name : Build and push
273
290
id : bake
274
- uses : docker/bake-action@v6.6 .0
291
+ uses : docker/bake-action@v6.5 .0
275
292
with :
276
293
files : |
277
294
./docker-bake.hcl
278
295
cwd://${{ steps.meta.outputs.bake-file }}
279
296
cwd://${{ steps.meta-debug.outputs.bake-file }}
297
+ cwd://${{ steps.meta-syn2mas.outputs.bake-file }}
280
298
set : |
281
299
base.output=type=image,push=true
282
300
base.cache-from=type=registry,ref=${{ env.BUILDCACHE }}:buildcache
@@ -295,16 +313,48 @@ jobs:
295
313
# Only sign on tags and on commits on main branch
296
314
if : |
297
315
github.event_name != 'pull_request'
298
- && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main ')
316
+ && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/tchap ')
299
317
300
318
env :
301
319
REGULAR_DIGEST : ${{ steps.output.outputs.metadata && fromJSON(steps.output.outputs.metadata).regular.digest }}
302
320
DEBUG_DIGEST : ${{ steps.output.outputs.metadata && fromJSON(steps.output.outputs.metadata).debug.digest }}
321
+ SYN2MAS_DIGEST : ${{ steps.output.outputs.metadata && fromJSON(steps.output.outputs.metadata).syn2mas.digest }}
303
322
304
323
run : |-
305
324
cosign sign --yes \
306
325
"$IMAGE@$REGULAR_DIGEST" \
307
326
"$IMAGE@$DEBUG_DIGEST" \
327
+ "$IMAGE_SYN2MAS@$SYN2MAS_DIGEST"
328
+
329
+ syn2mas :
330
+ name : Release syn2mas on NPM
331
+ runs-on : ubuntu-24.04
332
+ if : ' false'
333
+
334
+ permissions :
335
+ contents : read
336
+ id-token : write
337
+
338
+ steps :
339
+ - name : Checkout the code
340
+
341
+
342
+ - name : Install Node
343
+
344
+ with :
345
+ node-version-file : ./tools/syn2mas/.nvmrc
346
+
347
+ - name : Install Node dependencies
348
+ working-directory : ./tools/syn2mas
349
+ run : npm ci
350
+
351
+ - name : Publish
352
+ uses : JS-DevTools/npm-publish@v3
353
+ with :
354
+ package : ./tools/syn2mas
355
+ token : ${{ secrets.NPM_TOKEN }}
356
+ provenance : true
357
+ dry-run : ${{ !startsWith(github.ref, 'refs/tags/') }}
308
358
309
359
release :
310
360
name : Release
@@ -313,6 +363,7 @@ jobs:
313
363
needs :
314
364
- assemble-archives
315
365
- build-image
366
+ - syn2mas
316
367
steps :
317
368
- name : Download the artifacts from the previous job
318
369
uses : actions/download-artifact@v4
@@ -352,14 +403,26 @@ jobs:
352
403
') }}
353
404
```
354
405
406
+ `syn2mas` migration tool:
407
+
408
+ - Digest:
409
+ ```
410
+ ${{ env.IMAGE_SYN2MAS }}@${{ fromJSON(needs.build-image.outputs.metadata).syn2mas.digest }}
411
+ ```
412
+ - Tags:
413
+ ```
414
+ ${{ join(fromJSON(needs.build-image.outputs.metadata).syn2mas.tags, '
415
+ ') }}
416
+ ```
417
+
355
418
files : |
356
419
artifacts/mas-cli-aarch64-linux.tar.gz
357
420
artifacts/mas-cli-x86_64-linux.tar.gz
358
421
draft : true
359
422
360
423
unstable :
361
424
name : Update the unstable release
362
- if : github.ref == 'refs/heads/main '
425
+ if : github.ref == 'refs/heads/tchap '
363
426
runs-on : ubuntu-24.04
364
427
365
428
needs :
0 commit comments