@@ -3,8 +3,9 @@ name: Build
33on :
44 push :
55 branches :
6- - main
6+ - main_tchap
77 - " release/**"
8+ - " test/**"
89 tags :
910 - " v*"
1011
2223 CARGO_NET_GIT_FETCH_WITH_CLI : " true"
2324 SCCACHE_GHA_ENABLED : " true"
2425 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
2729 DOCKER_METADATA_ANNOTATIONS_LEVELS : manifest,index
2830
2931jobs :
@@ -252,8 +254,24 @@ jobs:
252254 type=semver,pattern={{major}}
253255 type=sha
254256
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+
255273 - name : Setup Cosign
256- uses :
sigstore/[email protected] .2 274+ uses :
sigstore/[email protected] .1 257275
258276 - name : Set up Docker Buildx
259277@@ -271,12 +289,13 @@ jobs:
271289
272290 - name : Build and push
273291 id : bake
274- uses : docker/bake-action@v6.6 .0
292+ uses : docker/bake-action@v6.5 .0
275293 with :
276294 files : |
277295 ./docker-bake.hcl
278296 cwd://${{ steps.meta.outputs.bake-file }}
279297 cwd://${{ steps.meta-debug.outputs.bake-file }}
298+ cwd://${{ steps.meta-syn2mas.outputs.bake-file }}
280299 set : |
281300 base.output=type=image,push=true
282301 base.cache-from=type=registry,ref=${{ env.BUILDCACHE }}:buildcache
@@ -295,16 +314,48 @@ jobs:
295314 # Only sign on tags and on commits on main branch
296315 if : |
297316 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 ')
299318
300319 env :
301320 REGULAR_DIGEST : ${{ steps.output.outputs.metadata && fromJSON(steps.output.outputs.metadata).regular.digest }}
302321 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 }}
303323
304324 run : |-
305325 cosign sign --yes \
306326 "$IMAGE@$REGULAR_DIGEST" \
307327 "$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/') }}
308359
309360 release :
310361 name : Release
@@ -313,6 +364,7 @@ jobs:
313364 needs :
314365 - assemble-archives
315366 - build-image
367+ - syn2mas
316368 steps :
317369 - name : Download the artifacts from the previous job
318370 uses : actions/download-artifact@v4
@@ -352,14 +404,26 @@ jobs:
352404 ') }}
353405 ```
354406
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+
355419 files : |
356420 artifacts/mas-cli-aarch64-linux.tar.gz
357421 artifacts/mas-cli-x86_64-linux.tar.gz
358422 draft : true
359423
360424 unstable :
361425 name : Update the unstable release
362- if : github.ref == 'refs/heads/main '
426+ if : github.ref == 'refs/heads/main_tchap '
363427 runs-on : ubuntu-24.04
364428
365429 needs :
0 commit comments