1010 runs-on : ubuntu-latest
1111 env :
1212 ICR_NAMESPACE : solution-tutorials
13- ICR_REPOSITORY : tutorial-application-log-analysis
13+ ICR_REPOSITORY_FRONTEND : tutorial-text-analysis-code-engine-frontend
14+ ICR_REPOSITORY_BACKEND : tutorial-text-analysis-code-engine-backend
15+ ICR_REPOSITORY_BACKEND_JOB : tutorial-text-analysis-code-engine-backend-job
1416 steps :
1517 - name : Check out the repo
1618 uses : actions/checkout@v2
@@ -23,15 +25,46 @@ jobs:
2325 password : ${{ secrets.ICR_TOKEN }}
2426
2527 - name : Extract metadata (tags, labels) for Docker
26- id : meta
28+ id : meta-frontend
2729 uses : docker/metadata-action@v3.6.2
2830 with :
29- images : icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY }}
31+ images : icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY_FRONTEND }}
3032
3133 - name : Build and push image
3234 uses : docker/build-push-action@v2.8.0
3335 with :
34- context : .
36+ context : ./frontend
37+ file : ./frontend/Dockerfile
3538 push : true
36- tags : ${{ steps.meta.outputs.tags }}
37- labels : ${{ steps.meta.outputs.labels }}
39+ tags : ${{ steps.meta-frontend.outputs.tags }}
40+ labels : ${{ steps.meta-frontend.outputs.labels }}
41+
42+ - name : Extract metadata (tags, labels) for Docker
43+ id : meta-backend
44+ uses : docker/metadata-action@v3.6.2
45+ with :
46+ images : icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY_BACKEND }}
47+
48+ - name : Build and push image
49+ uses : docker/build-push-action@v2.8.0
50+ with :
51+ context : ./backend
52+ file : ./backend/Dockerfile
53+ push : true
54+ tags : ${{ steps.meta-backend.outputs.tags }}
55+ labels : ${{ steps.meta-backend.outputs.labels }}
56+
57+ - name : Extract metadata (tags, labels) for Docker
58+ id : meta-backend-job
59+ uses : docker/metadata-action@v3.6.2
60+ with :
61+ images : icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY_BACKEND_JOB }}
62+
63+ - name : Build and push image
64+ uses : docker/build-push-action@v2.8.0
65+ with :
66+ context : ./jobs
67+ file : ./jobs/Dockerfile
68+ push : true
69+ tags : ${{ steps.meta-backend-job.outputs.tags }}
70+ labels : ${{ steps.meta-backend-job.outputs.labels }}
0 commit comments