@@ -145,3 +145,57 @@ jobs:
145145 npm publish --verbose --access public ${{ env.PACKAGE_FILE }}
146146 env :
147147 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
148+
149+ build_and_push_docker_image :
150+ name : " Build Docker Images 🛠"
151+ runs-on : ubuntu-latest
152+ needs : release-to-npmjs
153+ permissions :
154+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
155+ contents : read
156+ packages : write
157+ attestations : write
158+ steps :
159+ - name : " Checkout Repository 🛎"
160+ uses : actions/checkout@v4
161+
162+ - name : " Set up Docker Buildx 🏗"
163+ uses : docker/setup-buildx-action@v3
164+
165+ - name : " Login to GH Container Registry 🐳"
166+ uses : docker/login-action@v3
167+ with :
168+ registry : ${{ env.REGISTRY }}
169+ username : ${{ github.actor }}
170+ password : ${{ secrets.GITHUB_TOKEN }}
171+
172+ - name : " Add Docker metadata 📝"
173+ id : meta
174+ uses : docker/metadata-action@v5
175+ with :
176+ images : |
177+ ${{ env.REGISTRY }}/conda-store-ui
178+ tags : |
179+ type=ref,event=tag
180+ type=ref,event=branch
181+ type=sha
182+
183+ - name : " Publish Docker image 🚀"
184+ id : push
185+ uses : docker/build-push-action@v5
186+ with :
187+ context : .
188+ target : " prod"
189+ tags : |
190+ ${{ steps.meta.outputs.tags }}
191+ push : true
192+ labels : ${{ steps.meta.outputs.labels }}
193+ cache-from : type=gha
194+ cache-to : type=gha,mode=max
195+
196+ - name : Generate artifact attestation
197+ uses : actions/attest-build-provenance@v2
198+ with :
199+ subject-name : ${{ env.REGISTRY }}/conda-store-ui
200+ subject-digest : ${{ steps.push.outputs.digest }}
201+ push-to-registry : true
0 commit comments