File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1- name : Build and Push Backend Image
1+ name : Build and Push Images
22
33on :
44 push :
88jobs :
99 build-and-push :
1010 runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ include :
14+ - name : backend
15+ context : backend
16+ package : modai-chat-backend
17+ - name : frontend
18+ context : frontend_omni
19+ package : modai-chat-frontend
1120 permissions :
1221 contents : read
1322 packages : write
@@ -28,14 +37,14 @@ jobs:
2837 id : meta
2938 uses : docker/metadata-action@v5
3039 with :
31- images : ghcr.io/${{ github.repository_owner }}/modai-chat-backend
40+ images : ghcr.io/${{ github.repository_owner }}/${{ matrix.package }}
3241 tags : |
3342 type=raw,value=latest
3443
3544 - name : Build and push Docker image
3645 uses : docker/build-push-action@v6
3746 with :
38- context : backend
47+ context : ${{ matrix.context }}
3948 push : true
4049 tags : ${{ steps.meta.outputs.tags }}
4150 labels : ${{ steps.meta.outputs.labels }}
@@ -46,10 +55,18 @@ jobs:
4655 name : Cleanup Untagged Images
4756 runs-on : ubuntu-latest
4857 needs : build-and-push
58+ strategy :
59+ matrix :
60+ include :
61+ - name : backend
62+ package : modai-chat-backend
63+ - name : frontend
64+ package : modai-chat-frontend
4965 permissions :
5066 packages : write
5167 steps :
5268 - name : Delete untagged images
5369 uses : dataaxiom/ghcr-cleanup-action@v1
5470 with :
5571 delete-untagged : true
72+ package : ${{ matrix.package }}
You can’t perform that action at this time.
0 commit comments