Skip to content

Commit 92498d3

Browse files
Adding a hardcoded createdBy parameter to the deploy.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file.
1 parent 20fd8da commit 92498d3

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ jobs:
150150
gptModelVersion="2024-08-06" \
151151
gptDeploymentCapacity="30" \
152152
aiDeploymentsLocation="${{ env.AZURE_LOCATION }}" \
153+
createdBy="Pipeline" \
153154
--query "properties.outputs" -o json); then
154155
echo "❌ Deployment failed. See logs above."
155156
exit 1

infra/main.bicep

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,14 +417,16 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
417417
disableLocalAuth: true
418418
}
419419
}
420-
var deployerInfo = deployer()
420+
421+
@description('Optional created by user name')
422+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
421423
// ========== Resource Group Tag ========== //
422424
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
423425
name: 'default'
424426
properties: {
425427
tags: {
426428
TemplateName: 'Content Processing'
427-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
429+
CreatedBy: createdBy
428430
}
429431
}
430432
}

0 commit comments

Comments
 (0)