5959 name : " Build and Deploy Dashboard"
6060 runs-on : ubicloud-standard-4
6161 needs : changes
62+ outputs :
63+ dashboard-image-tag : ${{ steps.build-dashboard.outputs.image-tag }}
6264 env :
6365 GRAM_GIT_SHA : " ${{ github.sha }}"
6466 steps :
@@ -136,7 +138,7 @@ jobs:
136138 password : ${{ steps.auth.outputs.access_token }}
137139
138140 - name : Build and Push Registry image to GCR
139- id : build
141+ id : build-dashboard
140142 if : needs.changes.outputs.client == 'true'
141143 uses : ./.github/workflows/composite/build-push
142144 with :
@@ -155,6 +157,8 @@ jobs:
155157 name : " Build and Deploy Server"
156158 runs-on : ubicloud-standard-4
157159 needs : changes
160+ outputs :
161+ server-image-tag : ${{ steps.build-server.outputs.image-tag }}
158162 env :
159163 GOMAXPROCS : 4
160164 steps :
@@ -181,7 +185,7 @@ jobs:
181185 username : oauth2accesstoken
182186 password : ${{ steps.auth.outputs.access_token }}
183187 - name : Build and Push Registry image to GCR
184- id : build
188+ id : build-server
185189 if : ${{ needs.changes.outputs.server == 'true' }}
186190 uses : ./.github/workflows/composite/build-push
187191 with :
@@ -218,12 +222,12 @@ jobs:
218222 - name : Update Helm Values for Staging
219223 run : |
220224 # Update server image tag
221- sed -i "s|tag: sha-[a-f0-9]*|tag: ${{ needs.build-and-deploy.outputs.server-image-tag }}|g" \
225+ sed -i "s|tag: sha-[a-f0-9]*|tag: ${{ needs.build-and-deploy-server .outputs.server-image-tag }}|g" \
222226 gitops-repo/infra/helm/gram/values-dev.yaml
223227
224228 # Update dashboard image tag (if it exists in values)
225229 if grep -q "dashboard:" gitops-repo/infra/helm/gram/values-dev.yaml; then
226- sed -i "s|tag: sha-[a-f0-9]*|tag: ${{ needs.build-and-deploy.outputs.dashboard -image-tag }}|g" \
230+ sed -i "s|tag: sha-[a-f0-9]*|tag: ${{ needs.build-and-deploy-dashboard .outputs.server -image-tag }}|g" \
227231 gitops-repo/infra/helm/gram/values-dev.yaml
228232 fi
229233
0 commit comments