Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Target the v2.0 rebase-action template
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbond-msft authored and emaf committed Aug 7, 2024
1 parent 980a0dc commit 840f8b3
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions .github/workflows/rebase-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

jobs:
launchBackportBuild:
setupRebase:
runs-on: ubuntu-latest
# GITHUB_TOKEN change from read-write to read-only on 2024-02-01 requires permissions block
# https://docs.opensource.microsoft.com/github/apps/permission-changes/
Expand All @@ -15,15 +15,35 @@ jobs:
contents: read
security-events: write
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@gitbot rebase')

steps:
- uses: xamarin/rebase-bot-action@v1.0
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
comment_author: ${{ github.actor }}
github_repository: ${{ github.repository }}
ado_organization: ${{ secrets.ADO_PROJECTCOLLECTION }}
ado_project: ${{ secrets.ADO_PROJECT }}
rebase_pipeline_id: 13926
ado_build_pat: ${{ secrets.ADO_BUILDPAT }}
github_account_pat: ${{ secrets.SERVICEACCOUNT_PAT }}
- name: Show Comment
shell: pwsh
id: show_comment
run: |
Write-Host "Comment: ${env:COMMENT}"
env:
COMMENT: "${{ github.event.comment.body }}"

launchRebaseBuild:
needs: setupRebase
uses: xamarin/rebase-bot-action/.github/workflows/rebase-action.yml@v2.0
# GITHUB_TOKEN change from read-write to read-only on 2024-02-01 requires 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: write
contents: read
security-events: write
id-token: write # The rebase-action template being invoked requires this permission
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
comment_author: ${{ github.actor }}
github_repository: ${{ github.repository }}
secrets:
azure_tenant_id: ${{ secrets.REBASE_AZURE_TENANT_ID }}
azure_subscription_id: ${{ secrets.REBASE_AZURE_SUBSCRIPTION_ID }}
azure_client_id: ${{ secrets.REBASE_AZURE_CLIENT_ID }}
ado_organization: ${{ secrets.ADO_PROJECTCOLLECTION }}
ado_project: ${{ secrets.ADO_PROJECT }}
rebase_pipeline_id: ${{ secrets.REBASE_PIPELINEID }}
github_account_pat: ${{ secrets.SERVICEACCOUNT_PAT }}

0 comments on commit 840f8b3

Please sign in to comment.