File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,14 @@ jobs:
137137 capacity=${{ env.GPT_MIN_CAPACITY }} \
138138 imageVersion="${IMAGE_TAG}" \
139139 createdBy="Pipeline"
140+ - name : Assign Contributor role to Service Principal
141+ if : always()
142+ run : |
143+ echo "Assigning Contributor role to SPN for RG: ${{ env.RESOURCE_GROUP_NAME }}"
144+ az role assignment create \
145+ --assignee ${{ secrets.AZURE_CLIENT_ID }} \
146+ --role "Contributor" \
147+ --scope /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.RESOURCE_GROUP_NAME }}
140148
141149 - name : Get Deployment Output and extract Values
142150 id : get_output
@@ -403,4 +411,4 @@ jobs:
403411 if : always()
404412 run : |
405413 az logout
406- echo "Logged out from Azure."
414+ echo "Logged out from Azure."
You can’t perform that action at this time.
0 commit comments