Skip to content

Commit 70d6eaa

Browse files
authored
Use GitHub app for pushing to the VMR during synchronization (#55698)
1 parent 6dc7315 commit 70d6eaa

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎eng/pipelines/templates/jobs/vmr-synchronization.yml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
value: $(Agent.BuildDirectory)/vmr
3131
- ${{ if not(parameters.noPush) }}:
3232
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
33-
- group: DotNetBot-GitHub
33+
- group: VMR Synchronization - Push
3434
- group: DotNetBot-GitHub-No-Scopes
3535
- name: vmrPublicUrl
3636
value: https://github.com/dotnet/dotnet
@@ -68,13 +68,23 @@ jobs:
6868
- ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}:
6969
# Push main and release branches to the public VMR
7070
- ${{ if or(eq(parameters.vmrBranch, 'main'), startsWith(parameters.vmrBranch, 'release/')) }}:
71+
- template: /eng/common/templates-official/steps/get-github-app-token.yml
72+
parameters:
73+
azureSubscription: DncEng-VSTS
74+
keyVaultName: dnceng-pipeline-secrets
75+
keyName: vmr-synchronization-app-client-secret
76+
appClientId: $(vmr-synchronization-app-client-id)
77+
installationOwner: dotnet
78+
outputVariableName: vmrPushToken
79+
displayName: Get GitHub token for pushing to dotnet/dotnet
80+
7181
- script: >
7282
./.dotnet/dotnet darc vmr push
7383
--vmr '$(vmrPath)'
7484
--commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)'
7585
--branch '${{ parameters.vmrBranch }}'
7686
--remote-url '$(vmrPublicUrl)'
77-
--github-pat '$(BotAccount-dotnet-bot-repo-PAT)'
87+
--github-pat '$(vmrPushToken)'
7888
--verbose
7989
displayName: Push changes to dotnet/dotnet (public)
8090
workingDirectory: $(Agent.BuildDirectory)/sdk

0 commit comments

Comments
 (0)