Skip to content

Commit 9fc4caa

Browse files
Merge pull request #50 from microsoft/psl-fix-validate-template
fix: add createdBy param in ci.yml
2 parents 7dd6f76 + d9333f6 commit 9fc4caa

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- main
66
- dev
77
- demo
8+
pull_request:
9+
branches:
10+
- dev
811
schedule:
912
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
1013
workflow_dispatch: # Allow manual triggering
@@ -113,7 +116,8 @@ jobs:
113116
--parameters solutionName=${{env.SOLUTION_PREFIX}} \
114117
--parameters location=${{ env.AZURE_LOCATION }} \
115118
--parameters aiDeploymentLocation=${{ env.AZURE_LOCATION }} \
116-
--parameters azureAiServiceLocation=${{ env.AZURE_LOCATION }}
119+
--parameters azureAiServiceLocation=${{ env.AZURE_LOCATION }} \
120+
--parameters createdBy="pipeline" \
117121
118122
119123
- name: Extract AI Services and Key Vault Names

infra/main.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ param cosmosLocation string = 'eastus2'
100100
param existingLogAnalyticsWorkspaceId string = ''
101101

102102
@description('Tag, Created by user name')
103-
param createdBy string = contains(deployer(), 'userPrincipalName')
104-
? split(deployer().userPrincipalName, '@')[0]
105-
: deployer().objectId
103+
param createdBy string = deployer().objectId
106104

107105
// Get the current deployer's information for local debugging permissions
108106
var deployerInfo = deployer()
109107
var deployingUserPrincipalId = deployerInfo.objectId
110-
var deployingUserType = !empty(deployerInfo.userPrincipalName) ? 'User' : 'ServicePrincipal'
108+
var deployingUserType = contains(deployerInfo, 'userPrincipalName') ? 'User' : 'ServicePrincipal'
111109

112110
@description('Optional. Resource ID of an existing Foundry project')
113111
param existingFoundryProjectResourceId string = ''

0 commit comments

Comments
 (0)