forked from elastic/rally-tracks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backport action (elastic#599) (elastic#680)
(cherry picked from commit 3ae3304) Co-authored-by: Gareth Ellis <[email protected]>
- Loading branch information
1 parent
cf817c7
commit bd4905f
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-->" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |