[release/8.0] Add scripts for obtaining GitHub app tokens in pipelines - #17298
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds shared Azure Pipelines templates and a PowerShell helper to mint short-lived GitHub App installation tokens (via Key Vault signing + GitHub API exchange) so pipelines can authenticate without long-lived PATs, aligning with the backport needs for release/8.0.
Changes:
- Introduces a core Azure Pipelines step template to acquire a GitHub App installation token.
- Adds “official” vs “non-official” wrapper step templates intended to route to the same core implementation.
- Adds
Get-GitHubAppToken.ps1to sign a JWT with an Azure Key Vault key and exchange it for an installation access token.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| eng/common/core-templates/steps/get-github-app-token.yml | Core AzureCLI step that calls the PowerShell token-minting script. |
| eng/common/templates/steps/get-github-app-token.yml | Non-official wrapper for the core template (parameter forwarding). |
| eng/common/templates-official/steps/get-github-app-token.yml | Official wrapper for the core template (parameter forwarding). |
| eng/common/Get-GitHubAppToken.ps1 | Implements JWT signing via Key Vault and installation token minting via GitHub API. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+7
| steps: | ||
| - template: /eng/common/core-templates/steps/get-github-app-token.yml | ||
| parameters: | ||
| is1ESPipeline: false | ||
|
|
||
| ${{ each parameter in parameters }}: | ||
| ${{ parameter.key }}: ${{ parameter.value }} |
Comment on lines
+48
to
+50
| - name: is1ESPipeline | ||
| type: boolean | ||
|
|
Comment on lines
+139
to
+145
| if ($OutputVariableName) { | ||
| Write-Host "Setting pipeline variable '$OutputVariableName'." | ||
| Write-Host "##vso[task.setvariable variable=$OutputVariableName;issecret=true]$($tokenResponse.token)" | ||
| } | ||
| else { | ||
| Write-Host $tokenResponse.token -ForegroundColor Green | ||
| } |
Comment on lines
+1
to
+7
| steps: | ||
| - template: /eng/common/core-templates/steps/get-github-app-token.yml | ||
| parameters: | ||
| is1ESPipeline: true | ||
|
|
||
| ${{ each parameter in parameters }}: | ||
| ${{ parameter.key }}: ${{ parameter.value }} |
pavel-purma
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #17261
Will be needed for dotnet/arcade-services#6531 in installer's 8.0 branch