From 194830612433c2d61935aaea15dbc14a9b14d655 Mon Sep 17 00:00:00 2001 From: Mike Bond Date: Tue, 6 Aug 2024 14:08:48 -0700 Subject: [PATCH] Structure equivalent to backport trigger --- .github/workflows/rebase-trigger.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebase-trigger.yml b/.github/workflows/rebase-trigger.yml index fdf2afc..6a80d4e 100644 --- a/.github/workflows/rebase-trigger.yml +++ b/.github/workflows/rebase-trigger.yml @@ -5,8 +5,27 @@ on: types: [created] jobs: - launchRebaseBuild: + 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/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/ @@ -28,5 +47,4 @@ jobs: ado_project: ${{ secrets.ADO_PROJECT }} rebase_pipeline_id: ${{ secrets.REBASE_PIPELINEID }} github_account_pat: ${{ secrets.SERVICEACCOUNT_PAT }} - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@gitbot rebase')