@@ -19,13 +19,16 @@ jobs:
1919
2020 - uses : actions/setup-node@v4
2121 with :
22- node-version : 18
22+ node-version-file : package.json
2323 cache : npm
2424
2525 # Working around https://github.com/npm/cli/issues/4828
2626 # - run: npm ci
2727 - run : npm install --no-package-lock
2828
29+ - name : Check version consistency
30+ run : npm run check-version
31+
2932 - name : Check linting
3033 working-directory : ./client
3134 run : npm run lint
5053 - uses : actions/checkout@v4
5154 - uses : actions/setup-node@v4
5255 with :
53- node-version : 18
56+ node-version-file : package.json
5457 cache : npm
5558 registry-url : " https://registry.npmjs.org"
5659
6265 - run : npm run publish-all
6366 env :
6467 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
68+
69+ publish-github-container-registry :
70+ runs-on : ubuntu-latest
71+ if : github.event_name == 'release'
72+ environment : release
73+ needs : build
74+ permissions :
75+ contents : read
76+ packages : write
77+ attestations : write
78+ id-token : write
79+ steps :
80+ - uses : actions/checkout@v4
81+
82+ - name : Log in to the Container registry
83+ uses : docker/login-action@v3
84+ with :
85+ registry : ghcr.io
86+ username : ${{ github.actor }}
87+ password : ${{ secrets.GITHUB_TOKEN }}
88+
89+ - name : Extract metadata (tags, labels) for Docker
90+ id : meta
91+ uses : docker/metadata-action@v5
92+ with :
93+ images : ghcr.io/${{ github.repository }}
94+
95+ - name : Set up QEMU
96+ uses : docker/setup-qemu-action@v3
97+
98+ - name : Set up Docker Buildx
99+ uses : docker/setup-buildx-action@v3
100+
101+ - name : Build and push Docker image
102+ id : push
103+ uses : docker/build-push-action@v6
104+ with :
105+ context : .
106+ push : true
107+ platforms : linux/amd64,linux/arm64
108+ tags : ${{ steps.meta.outputs.tags }}
109+ labels : ${{ steps.meta.outputs.labels }}
110+
111+ - name : Generate artifact attestation
112+ uses : actions/attest-build-provenance@v2
113+ with :
114+ subject-name : ghcr.io/${{ github.repository }}
115+ subject-digest : ${{ steps.push.outputs.digest }}
116+ push-to-registry : true
0 commit comments