2021-02-08 22:08:23 +01:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
- closed
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
backport:
|
|
|
|
name: Backport PR
|
2021-02-10 22:42:00 +01:00
|
|
|
if: |
|
|
|
|
github.event.pull_request.merged == true
|
|
|
|
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
|
|
|
|
&& (
|
|
|
|
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
|
|
|
|
|| (github.event.action == 'closed')
|
|
|
|
)
|
2021-02-08 22:08:23 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-02-16 18:48:30 +01:00
|
|
|
- name: Checkout Actions
|
|
|
|
uses: actions/checkout@v2
|
2021-02-08 22:08:23 +01:00
|
|
|
with:
|
2021-02-16 18:48:30 +01:00
|
|
|
repository: 'elastic/kibana-github-actions'
|
|
|
|
ref: main
|
|
|
|
path: ./actions
|
2021-02-08 22:08:23 +01:00
|
|
|
|
2021-02-16 18:48:30 +01:00
|
|
|
- name: Install Actions
|
|
|
|
run: npm install --production --prefix ./actions
|
2021-02-08 22:08:23 +01:00
|
|
|
|
2021-02-16 18:48:30 +01:00
|
|
|
- name: Run Backport
|
|
|
|
uses: ./actions/backport
|
|
|
|
with:
|
|
|
|
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
|
|
|
|
commit_user: kibanamachine
|
|
|
|
commit_email: 42973632+kibanamachine@users.noreply.github.com
|
2021-03-16 21:29:36 +01:00
|
|
|
auto_merge: 'true'
|
|
|
|
auto_merge_method: 'squash'
|
|
|
|
manual_backport_command_template: 'node scripts/backport --pr %pullNumber%'
|