Skip to content

Commit

Permalink
Add backport action (elastic#599) (elastic#680)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3ae3304)

Co-authored-by: Gareth Ellis <[email protected]>
  • Loading branch information
github-actions[bot] and gareth-ellis authored Sep 25, 2024
1 parent cf817c7 commit bd4905f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"repoOwner": "elastic",
"repoName": "rally-tracks",
"targetBranchChoices": [
"8.15",
"8.14",
"8.13"
],
"targetPRLabels": [
"backport"
],
"branchLabelMapping": {
"^backport-to-(.+)$": "$1"
},
"autoMerge": true,
"autoMergeMethod": "squash",
"prDescription": "{defaultPrDescription}\n\n<!--BACKPORT {commits} BACKPORT-->"
}
27 changes: 27 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Automatic backport action

on:
pull_request_target:
branches: ['master']
types: ["labeled", "closed"]

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true
&& !contains(github.event.pull_request.labels.*.name, 'backport')
steps:
- name: Backport Action
uses: sorenlouv/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log

0 comments on commit bd4905f

Please sign in to comment.