This commit is contained in:
Connor Adsit 2022-10-24 13:16:17 -04:00 коммит произвёл GitHub
Родитель eab7442066
Коммит 020d92e8cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 29 добавлений и 14 удалений

43
.github/workflows/backport-trigger.yml поставляемый
Просмотреть файл

@ -5,19 +5,34 @@ on:
types: [created]
jobs:
launchBackportBuild:
setupBackport:
runs-on: ubuntu-latest
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@gitbot backport')
if: github.event.issue.pull_request != '' && startswith(github.event.comment.body, '@gitbot backport')
outputs:
target_branch: ${{ steps.parse_comment.outputs.target_branch }}
steps:
- uses: xamarin/backport-bot-action@v1.0
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
comment_body: ${{ github.event.comment.body }}
comment_author: ${{ github.actor }}
github_repository: ${{ github.repository }}
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 }}
- name: Parse Comment
id: parse_comment
run: |
Write-Host "Parsing $env:COMMENT"
($botName, $backport, $backportTargetBranch) = [System.Text.RegularExpressions.Regex]::Split("$env:COMMENT", "\s+")
echo "::set-output name=target_branch::$backportTargetBranch"
shell: pwsh
env:
COMMENT: "${{ github.event.comment.body }}"
launchBackportBuild:
needs: setupBackport
uses: xamarin/backport-bot-action/.github/workflows/backport-action.yml@v1.1
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: false
secrets:
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 }}