Skip to content

Commit 65d843d

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 eaa25ec commit 65d843d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ jobs:
135135
aiDeploymentsLocation="eastus" \
136136
useWafAlignedArchitecture=false \
137137
capacity=${{ env.GPT_MIN_CAPACITY }} \
138-
imageVersion="${IMAGE_TAG}"
138+
imageVersion="${IMAGE_TAG}" \
139+
createdBy="Pipeline"
139140
140141
- name: Get Deployment Output and extract Values
141142
id: get_output

infra/main.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ var modelDeployment = {
134134

135135
var abbrs = loadJsonContent('./abbreviations.json')
136136

137-
var deployerInfo = deployer()
137+
@description('Optional created by user name')
138+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
138139

139140
// ========== Resource Group Tag ========== //
140141
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
@@ -143,7 +144,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
143144
tags: {
144145
...allTags
145146
TemplateName: 'Code Modernization'
146-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
147+
CreatedBy: createdBy
147148
}
148149
}
149150
}

0 commit comments

Comments
 (0)