|
30 | 30 | value: $(Agent.BuildDirectory)/vmr |
31 | 31 | - ${{ if not(parameters.noPush) }}: |
32 | 32 | - ${{ 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 |
34 | 34 | - group: DotNetBot-GitHub-No-Scopes |
35 | 35 | - name: vmrPublicUrl |
36 | 36 | value: https://github.com/dotnet/dotnet |
@@ -68,13 +68,23 @@ jobs: |
68 | 68 | - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: |
69 | 69 | # Push main and release branches to the public VMR |
70 | 70 | - ${{ 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 | + |
71 | 81 | - script: > |
72 | 82 | ./.dotnet/dotnet darc vmr push |
73 | 83 | --vmr '$(vmrPath)' |
74 | 84 | --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' |
75 | 85 | --branch '${{ parameters.vmrBranch }}' |
76 | 86 | --remote-url '$(vmrPublicUrl)' |
77 | | - --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' |
| 87 | + --github-pat '$(vmrPushToken)' |
78 | 88 | --verbose |
79 | 89 | displayName: Push changes to dotnet/dotnet (public) |
80 | 90 | workingDirectory: $(Agent.BuildDirectory)/sdk |
|
0 commit comments