From 438efdea82cc67cbeeb5df59c237e0450721d263 Mon Sep 17 00:00:00 2001 From: Myuddin Khatri <53251406+MyuddinKhatri@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:42:57 +0530 Subject: [PATCH] ci: backport config (#271) Co-authored-by: Tyler Matteson --- .backportrc.json | 11 +++++++++++ .github/workflows/backport.yml | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .backportrc.json create mode 100644 .github/workflows/backport.yml diff --git a/.backportrc.json b/.backportrc.json new file mode 100644 index 00000000..53b5e3e5 --- /dev/null +++ b/.backportrc.json @@ -0,0 +1,11 @@ +{ + "repoOwner": "agritheory", + "repoName": "check_run", + "targetBranchChoices": [ + "version-14", + "version-15" + ], + "branchLabelMapping": { + "^backport-to-(.+)$": "$1" + } +} \ No newline at end of file diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..2fef06c5 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,24 @@ +name: Automatic backport action + +on: + pull_request_target: + types: ["labeled", "closed"] + +jobs: + backport: + name: Backport PR + runs-on: ubuntu-latest + steps: + - name: Backport Action + uses: sorenlouv/backport-github-action@v9.5.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + auto_backport_label_prefix: backport-to- + + - name: Info log + if: ${{ success() }} + run: cat ~/.backport/backport.info.log + + - name: Debug log + if: ${{ failure() }} + run: cat ~/.backport/backport.debug.log \ No newline at end of file