-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.89 KB
/
rebase-trigger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Rebase Trigger
on:
issue_comment:
types: [created]
jobs:
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/
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
actions: write
contents: read
security-events: write
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@gitbot rebase')
steps:
- 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/[email protected]
# 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 }}