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