Skip to content

Commit

Permalink
Target the v2.0 backport-action template
Browse files Browse the repository at this point in the history
Use managed identity (MI) properties in place of an Azure DevOps personal access token (PAT)
  • Loading branch information
mjbond-msft committed Jul 1, 2024
1 parent 1180b82 commit 366e6a2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/backport-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,26 @@ jobs:

launchBackportBuild:
needs: setupBackport
uses: xamarin/backport-bot-action/.github/workflows/[email protected]
uses: xamarin/backport-bot-action/.github/workflows/[email protected]
# GITHUB_TOKEN change from read-write to read-only on 2024-02-01 requiring permissions block
# https://docs.opensource.microsoft.com/github/apps/permission-changes/
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
actions: none
contents: read
security-events: none
id-token: write # The backport-action template being invoked requires this permission
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
target_branch: ${{ needs.setupBackport.outputs.target_branch }}
comment_author: ${{ github.actor }}
github_repository: ${{ github.repository }}
use_fork: true
secrets:
azure_tenant_id: ${{ secrets.BACKPORT_AZURE_TENANT_ID }}
azure_subscription_id: ${{ secrets.BACKPORT_AZURE_SUBSCRIPTION_ID }}
azure_client_id: ${{ secrets.BACKPORT_AZURE_CLIENT_ID }}
ado_organization: ${{ secrets.ADO_PROJECTCOLLECTION }}
ado_project: ${{ secrets.ADO_PROJECT }}
backport_pipeline_id: ${{ secrets.BACKPORT_PIPELINEID }}
ado_build_pat: ${{ secrets.ADO_BUILDPAT }}
github_account_pat: ${{ secrets.SERVICEACCOUNT_PAT }}

0 comments on commit 366e6a2

Please sign in to comment.