From 2090b1ef6c02f48fee67e1a82dbeab12ba820d9f Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Sun, 20 Feb 2022 21:13:38 -0800 Subject: [PATCH] Updating backport workflow to include custom branch name (#302) * Updating backport workflow to include custom branch name Signed-off-by: Vacha Shah --- .github/workflows/backport.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c0d07fef..e47d8d88 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,6 +1,6 @@ name: Backport on: - pull_request: + pull_request_target: types: - closed - labeled @@ -8,9 +8,21 @@ on: jobs: backport: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write name: Backport steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + - name: Backport - uses: tibdex/backport@v1 + uses: VachaShah/backport@v1.1.4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ steps.github_app_token.outputs.token }} + branch_name: backport/backport-${{ github.event.number }}